0Pricing
Flask Academy · Lesson

Review and Edit Generated Scripts

Fix autogenerated migrations before applying.

Autogenerate Is Not Perfect

Autogenerate is a great first draft, not a final answer. Always review the script before you apply it anywhere. 🔍

Open the Versions File

Each script lives in the versions folder. Open it and read the upgrade and downgrade functions like any other code.

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