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
- Why You Need Migrations, Not create_all
- Init and Autogenerate a Migration
- Apply and Roll Back with upgrade
- Review and Edit Generated Scripts