-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index order :desc isn't saved into schema.rb after migration #30902
Comments
I successfully reproduced this bug using I'll try to work in a fix |
Thanks. I've prepped the start of a test if that would help but I don't know where to go from there, e.g. see/dump the current state of the schema or reload the schema. |
I know of a library to parse |
Although the sqlite adapter supports index sort orders, they weren't being written to db/schema.rb.
Save index order :desc to schema.rb (sqlite). Fixes #30902
Steps to reproduce
I tried to create a bugreport testcase but couldn't figure out all the API calls needed to reproduce entirely, so here are manual steps:
Ok so far so good. However the schema.rb has no mention of the sort order:
So when I drop and recreate the database, the index is added without the DESC:
Expected behavior
The information relating to index sorting order should be persistent after applying a migration.
Actual behavior
The index sorting order is lost when dropping the database and loading via
db:schema:load
.System configuration
The text was updated successfully, but these errors were encountered: