0PricingLogin
Django Academy · Lesson

makemigrations vs migrate

How Django plans and applies schema changes.

Two Steps, Not One

Django changes your database in two steps: first it writes a plan, then it runs that plan. Knowing which is which saves a lot of confusion. 🧭

makemigrations Plans

makemigrations looks at your models, spots what changed, and writes a migration file describing the change. It does not touch the database yet.

python manage.py makemigrations

All lessons in this course

  1. makemigrations vs migrate
  2. Reading a Migration File
  3. Changing a Model and Re-migrating
  4. sqlmigrate and Inspecting SQL
← Back to Django Academy