Use migrations manifest #2308
Rather than running whatever files are in the migrations folders,
Added a pre-commit hook, that updates the manifest. To avoid issues with merge commits, the new pre-commit hook doesn't run in CI. However, if a commit is missing from the manifest the server tests will fail.
We'll have the added benefit of an easy to view changelog of migrations.
make db_dev_destroy && make db_dev_start && DB_TIMEOUT=30 make db_dev_create && make db_dev_migrate
Code Review Verification Steps
requested review from
Jul 2, 2019
@@ Coverage Diff @@ ## master #2308 +/- ## ========================================== - Coverage 59.85% 59.77% -0.08% ========================================== Files 266 265 -1 Lines 14768 14807 +39 ========================================== + Hits 8838 8850 +12 - Misses 4902 4929 +27 Partials 1028 1028
jim left a comment
Nice work on this.
For anyone who is interested, here is what you see if you create a migration and attempt to run it without updating the manifest:
To fix that, you can run
I'd like to see us add a
@jim - would just modifying this script help? https://github.com/transcom/mymove/blob/master/scripts/gen-model . I'm thinking