Skip to content

Create Flask database migrations

You can create migrations for your database using flask-migrate.

First, you need to initialize the migrations using the following command in your main project directory, after you have setup your database:

View Gist on GitHub

Now you can create a new migration:

View Gist on GitHub

To update the database to the new version:

View Gist on GitHub

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.