Skip to content

Database Migration

Changes to fidesctl could require a change to the database model. This includes scenarios where you want to persist a new field or replace an existing field. Changes made to the fidesctl database are done through alembic migration scripts. Migrations can be found in the following direcotry: src/fidesctl/api/ctl/migrations/versions

To create a new migration we use the alembic revision command:

cd src/fidesctl/api/ctl
alembic revision --autogenerate -m "migration message"

The autogenerated script should be verified and could require some manual changes. Migrations will run on the fidesctl server startup.

Back to top