-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use alembic for database table creation #298
Use alembic for database table creation #298
Conversation
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.
Really nice, thanks for your speedy work on this. I think we want to have this run when the imaging-api
starts up because the postgres init db script only runs if there is no database. That way we can update the schema without losing any data
Migrations can be skipped by setting SKIP_ALEMBIC=true in the environment. By default migrations will run.
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.
Code changes look perfect, assuming it runs! I think there's also some documentation we could add to the alembic README. Happy for you to merge once you're happy with it
Picked this up so my review shouldn't count
So we're consistent
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.
Not really familiar with Alembic, so probably not the best judge but it looks good to me.
A bit more documentation would be nice though 😬
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.
Looks good, huge improvement once it's over the line. Couple of small comments/questions here and there.
Also, shouldn't this be part of the core module?
Allows us to be able to control the upgrade of the pixl database tables in production with upgrades and rollbacks