argos/docs/developer/migrations.md
2024-11-25 17:02:09 +01:00

662 B

description
How to use Alambic to add a database migratation to Argos.

Adding a database migration

We are using Alembic to handle the database migrations. Here is how to proceed in order to add a new migration:

First, do your changes in the code, change the model, add new tables, etc. Once you're done, you can create a new migration.

venv/bin/alembic -c argos/server/migrations/alembic.ini revision \
    --autogenerate -m "migration reason"

Edit the created file to remove comments and adapt it to make sure the migration is complete (Alembic is not powerful enough to cover all the corner cases).