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
- id: C1 claim: Migrations propagate model changes into the database schema. source: S1 evidence: "Migrations are Django’s way of propagating changes you make to your models"
- id: C2 claim: migrate applies and unapplies migrations. source: S1 evidence: "migrate, which is responsible for applying and unapplying migrations."
- id: C3 claim: The executor loads migrations and runs them up or down. source: S2 evidence: "End-to-end migration execution - load migrations and run them up or down"
- id: C4 claim: The executor can migrate the database up to given targets. source: S2 evidence: "Migrate the database up to the given targets."
Sources
- [S1] Migrations. Django docs. https://docs.djangoproject.com/en/6.1/topics/migrations/ . License: BSD-3-Clause. Accessed 2026-11-10.
- [S2] django.db.migrations.executor.MigrationExecutor. Django source. https://github.com/django/django/blob/stable/6.1.x/django/db/migrations/executor.py . License: BSD-3-Clause. Accessed 2026-11-10.
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
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.},
}
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.