11# Database upgrade support
22
33This dir contains various files for developing database upgrades.
4- Upgrades are supported using Alembic via Flask-Migrate
5- and Flask-Script.
6- Users should be able to upgrade existing installs via:
4+ Upgrades are supported using Alembic via Flask-Migrate.
5+ Users should be able to upgrade existing installations via ` pixi ` :
76
87 # In top dir of installation
9- invoke upgrade
8+ pixi run db-upgrade
9+ # or the equivalent
10+ python manage.py upgrade
1011
1112The ` versions ` dir contains the various upgrades. These were
1213initially created using the Alembic ` autogenerate ` facility
@@ -20,12 +21,12 @@ for various DB management tasks related to migrations and upgrading.
2021Whenever a change in the database schema or table content
2122conventions has changed a new migration should be created via the command.
2223
23- python3 manage.py db migrate
24+ python manage.py migrate
2425
2526Where ` migrate ` is an alias for ` revision --autogenerate ` .
2627Alternatively if the autogeneration does not work, create an empty migration:
2728
28- python3 manage.py db revision
29+ python manage.py revision
2930
3031In both cases this will create a new revision and a ` <revision_number>_.py ` file
3132under ` versions/ ` to upgrade
@@ -37,9 +38,9 @@ to check various DB metadata.
3738
3839Subsequently the upgrade can be performed using:
3940
40- python3 manage.py db upgrade
41- # or the equivalent (for users)
42- invoke upgrade
41+ pixi run db- upgrade
42+ # or the equivalent
43+ python manage.py upgrade
4344
4445## Revisions
4546
0 commit comments