Skip to content

Database migrations

Friedrich Lindenberg edited this page Jun 6, 2015 · 1 revision
  1. Make sure you're in the virtualenv for SpenDB and run migrate script "<description>" migration. Replace <description> with a description for your change. For instance, "Add terms column".
  2. A new file will be created in migration/versions. The output of migrate will have the filename for it.
  3. Edit the file and add migration commands. Look into sqlalchemy-migrate documentation <https://sqlalchemy-migrate.readthedocs.org/en/latest/versioning.html#making-schema-changes>_ or other migrations in migration/versions for help on how to write a migration.
  4. Once you're done writing the migration, run it with ostool db migrate.