-
Notifications
You must be signed in to change notification settings - Fork 4
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
consolidate migrations #574
Conversation
98ad2a3
to
1ccad3c
Compare
Cant we just manually update the schema version (to 0) on live deployments and avoid reindexing? |
Probably not to 0, or the migration library will try to apply the migrations from this PR. I believe we need But yeah, +1 to doing that so that future migrations can run smoothly. Maybe otherwise the migrations lib might even complain because it might try down-migrations (from the current 24 down to 5) and realize it doesn't have reverse-migration scripts? Anyway, let's just do surgery. That's what staging is for :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the validation and the listing+explanation of diffs! Makes for an easy LGTM :)
Also, God's work :)
Oh when cutting a release, we should call special attention to this. We should also bump the minor version because this is a backwards-incompatible DB schema change. |
Note: #573 brings another small migration. Something to keep an eye on in case it goes in first. |
1ccad3c
to
097b141
Compare
Task
Once the runtime stuff is largely stable, and before (or after) we start mucking with consensus:
Group DB migrations into a smaller set of files.
This comes at the cost of later not being able to (trivially) migrate an arbitrarily old DB ... but since we think it's unlikely there are instances of nexus out in the wild, that's OK.
This PR
Completes the tas.
Functionally a no-op. It would be nice to do a full reindex once this goes in, however, future deployments will continue to work since the current deployed databases have much higher 'current migration' number. However, any future migrations applied on top of this will also not apply until a reindex is done.
Validation:
Comparison of the dumped database schema (using
pg_dump -s
) for main branch / feature branch: