argos/docs/developer/migrations.md
Luc Didry 4880c65681
💥 — Rename argos to argos-monitoring to fit the package name (fix #53)
Uninstall argos with `pip uninstall argos-monitoring` before installing this release!
2024-07-04 09:44:07 +02:00

587 B

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_monitoring/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).