This document is intended to developers.
Migrations on Tracim
lays on alembic
which is the migration tool dedicated to SQLAlchemy
.
In order to use the tracimcli
commands, go to the root of the project and
and active the Tracim virtualenv:
user@host:~/tracim_backend$ source env/bin/activate
(env) user@host:~/tracim_backend$
alembic -c development.ini upgrade head
alembic -c development.ini downgrade -1
alembic -c development.ini current
This creates a new auto-generated python migration file
in tracim/migration/versions/
ending by migration_label.py
:
alembic -c development.ini revision --autogenerate -m "migration label"