Apply and Roll Back with upgrade
Move the schema forward and backward.
From Script to Schema
You have a migration file, but the database has not changed yet. One command turns that script into real tables. 🚀
Run upgrade
flask db upgrade runs every pending migration and brings your database up to the latest version in order.
flask db upgradeAll lessons in this course
- Why You Need Migrations, Not create_all
- Init and Autogenerate a Migration
- Apply and Roll Back with upgrade
- Review and Edit Generated Scripts