Migrations - abeforgit/RestoWeb GitHub Wiki

Migrations are a way to version control the database while avoiding the mess of diffs that comes with integrating the db in the repo.

How to use migrations

Make sure you've set up the flask environment variables as mentioned in the server README.

To initialize or update the database:

  • navigate to the server directory
  • run flask db upgrade

After making changes to the model, make sure to upgrade the database:

  • again in the server directory, run flask db migrate