← All notes

Django migrations propagate model changes to the schema

Answer: Migrations are how Django turns changes you make to models (adding a field, deleting a model, and so on) into changes to the database schema.

Commands

makemigrations packages model changes into migration files. migrate applies and unapplies those migrations. sqlmigrate shows the SQL for a migration. showmigrations lists a project's migrations and their status.

Execution

The migration executor is the end-to-end runner: it loads migrations and runs them up or down to a specified set of targets. Migrating the database up to given targets happens in two steps: project states are built, then the database operations run.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Django documentation and source (django/django): Copyright (c) Django Software Foundation and individual contributors; BSD-3-Clause (https://raw.githubusercontent.com/django/django/stable/6.1.x/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Django docs, Migrations, BSD-3-Clause (django/django); Django source, django.db.migrations.executor.MigrationExecutor, BSD-3-Clause (django/django). Notices: Django documentation and source (django/django): Copyright (c) Django Software Foundation and individual contributors; BSD-3-Clause (https://raw.githubusercontent.com/django/django/stable/6.1.x/LICENSE).

Cite this

Permanent ID: iil:note:4qzknkjf

iinventedlight. 2026. "Django migrations propagate model changes to the schema." iinventedlight Library, iil:note:4qzknkjf, version of 2026-11-10. https://iinventedlight.com/library/notes/django-migrations/. License: CC-BY-4.0.

@misc{iil_note_4qzknkjf,
  author = {{iinventedlight}},
  title = {{Django migrations propagate model changes to the schema}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-10},
  url = {https://iinventedlight.com/library/notes/django-migrations/},
  note = {Permanent ID iil:note:4qzknkjf. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/django-migrations.md.