-
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
Update migration script to handle multiple migrations automatically #425 #430
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #430 +/- ##
===========================================
- Coverage 97.92% 97.89% -0.04%
===========================================
Files 45 48 +3
Lines 1594 1712 +118
===========================================
+ Hits 1561 1676 +115
- Misses 33 36 +3 ☔ View full report in Codecov by Sentry. |
feeac08
to
b40a965
Compare
4d90aec
to
cf0edc5
Compare
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 overall and works well. Just have some comments to make on core.py and some minor ones for the test.
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.
Just some more minor docstring comments.
Also, the |
Description
See #425. In its current form this PR replicates similar behaviour to alembic. New migrations can be added using
ims-migrate generate test_migration "Does nothing"
Then the last migration applied is stored inside the database, and looked up to determine which migrations need to be applied in order to reach a desired one e.g.
Applies all unapplied forward migrations in a single transaction. (This asks first although it would be simple to add a -y and even do what others do with alembic and put this in the docker file on start up - but its only a single command now anyway.)
This should hopefully make it easier to to apply the required migrations in the right order without specifying a list of migrations to perform when its time to update production.
Notes
Testing instructions
Add a set up instructions describing how the reviewer should test the code
Agile board tracking
Closes #425