Browse Source

include more detail on how to provide migrations..

main
John-Mark Gurney 1 year ago
parent
commit
37bd97e7f9
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      ui/DEV.md

+ 8
- 4
ui/DEV.md View File

@@ -27,10 +27,14 @@ Managing the db format
Alembic is used to manage upgrades. The following process should be
followed when updating the ORM:

1. Implement tests for new feature, and make changes to the ORM as needed.
2. Run the `autogen.sh` script to generate the base migration. Modify as
needed.
3. Add a test for the migration to _TestMigrations. This should test
1. Uncomment the orm.Base.metadata.create_all call, and comment out the
_handle_migration call a bit later, and disable the
test_<migration hash> tests.
2. Implement tests for new feature, and make changes to the ORM as needed.
3. Run the `autogen.sh` script from `medashare` to generate the base
migration. Modify as needed.
4. Add a test for the migration to _TestMigrations. This should test
by creating an ObjectStore at the previous stage, add representative
objects that will test the migration, and then run a migration, and
make sure features still work as expected afterward.
5. Revert changes made in step 1

Loading…
Cancel
Save