This document is intended to developers.
Migrations on Tracim
lays on gearbox migrate
, which in turn lays on alembic
which is the migration tool dedicated to SQLAlchemy
.
In order to use the gearbox migrate [...]
commands, change your current directory to be tracim/
from the root of the project, also usually named tracim/
:
(tg2env) user@host:~/tracim$ cd tracim/
(tg2env) user@host:~/tracim/tracim$
gearbox migrate upgrade
gearbox migrate downgrade
gearbox migrate db_version
This creates a new python migration file in tracim/migration/versions/
ending by migration_label.py
:
gearbox migrate create 'migration label'