0Pricing
Flask Academy · Lesson

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 upgrade

All lessons in this course

  1. Why You Need Migrations, Not create_all
  2. Init and Autogenerate a Migration
  3. Apply and Roll Back with upgrade
  4. Review and Edit Generated Scripts
← Back to Flask Academy