0PricingLogin
Flask Academy · Lesson

Why You Need Migrations, Not create_all

The risk of editing live schemas by hand.

Schemas Always Change

Real apps evolve, so your tables must change too. You will add columns, rename fields, and drop old ones as features grow. 🔄

create_all Only Builds Once

Remember the limit you met earlier: create_all only makes missing tables. It never touches a table that already exists.

db.create_all()

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