~/talk

The Anatomy of Django Migrations

Talkat PyCon India 2025 · 2025-09-12..09-15· [django, databases]
slides:none on file

Explains exactly how Django turns model edits into applied schema changes by using ModelState/AppState/ProjectState snapshots, an autodetector and questioner that rejects adding a non-null field without a default and prompts for values, and a migration graph (built by Loader) that uses depth‑first search to order nodes while Executor runs the plan. Mentions runpython for custom SQL, the South-to-core merge (PR #376 ~6,000 lines), and tooling for visualizing migration graphs.

AI-written summary · about

  1. 0:00Introduction to Django Migrations
  2. 3:22How Django Migrations Work
  3. 7:26ModelState vs Actual Model
  4. 9:48Handling Non-null Fields
  5. 11:57Autodetector and Questioner
  6. 12:17Migration Graph and DFS
  7. 15:44Reliability of Migration Graphs
  8. 16:29Loader and Executor Components
  9. 18:14History of Django Migrations
  10. 19:41Why Migrations Matter Beyond Django
  11. 20:50Q&A Session
~/search
type to search 6,518 conferences, 143,918 speakers and 192,133 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.