Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Django Migrations: A Retrospective
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Andrew Godwin
August 01, 2014
Programming
2
320
Django Migrations: A Retrospective
A talk I gave at DjangoCon AU 2014.
Andrew Godwin
August 01, 2014
Tweet
Share
More Decks by Andrew Godwin
See All by Andrew Godwin
Reconciling Everything
andrewgodwin
1
370
Django Through The Years
andrewgodwin
0
290
Writing Maintainable Software At Scale
andrewgodwin
0
500
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
400
Async, Python, and the Future
andrewgodwin
2
720
How To Break Django: With Async
andrewgodwin
1
780
Taking Django's ORM Async
andrewgodwin
0
780
The Long Road To Asynchrony
andrewgodwin
0
750
The Scientist & The Engineer
andrewgodwin
1
820
Other Decks in Programming
See All in Programming
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.9k
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
110
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
290
Understanding Apache Lucene - More than just full-text search
spinscale
0
130
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
160
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
410
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
6
1.9k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
2
280
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
690
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
400
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
120
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
200
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
110
Scaling GitHub
holman
464
140k
sira's awesome portfolio website redesign presentation
elsirapls
0
190
Building an army of robots
kneath
306
46k
What does AI have to do with Human Rights?
axbom
PRO
1
2k
Site-Speed That Sticks
csswizardry
13
1.1k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
450
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
A Tale of Four Properties
chriscoyier
163
24k
Transcript
Andrew Godwin @andrewgodwin migrations: a retrospective
Andrew Godwin Author of South migrations library Hi, I'm Author
of 1.7 Django migrations I like my tea iced, and my schemas explicit
Django/Python backend I work for Discovery? Mobile? Storage? UI? On-site?
...auditing? We have it all. We're hiring!
Migrations They're pretty good.
South ...it was good for its time
The Initial Plan Django Schema backend ORM Hooks South 2
Migration handling User interface
The Revised Plan Django Schema backend ORM Hooks South 2
Migration handling User interface Backport for 1.4 - 1.6
The Revised Revised Plan Django Schema backend ORM Hooks Migration
handling User interface
Logically Separate SchemaEditor Schema Migrations field.deconstruct() ModelOptions.apps Operations Loader /
Graph Executor Autodetector Optimiser State
makemigrations field.deconstruct() Loader / Graph Autodetector Optimiser State Writer 1
2 State 3 5 4
migrate SchemaEditor ModelOptions.apps Operations Loader / Graph Executor State 1
2 Recorder 3
Moving South into Django instead, "Adding migrations to Django"
A New Format More concise Declarative Introspectable
Migration actions Frozen ORM
None
In-memory running Creates models from migration sets Autodetector diffs created
from on-disk Used to feed SchemaEditor / ORM
But what went wrong?
Swappable Models
Your migration dependencies myapp/0001 myapp/0002 otherapp/0001 auth/0001 contenttypes/0001
myapp/0001 myapp/0002 otherapp/0001 auth/0001 contenttypes/0001 thirdapp/0001 Your migration dependencies on
swappable models
what? Your migration dependencies on swappable models myapp/0001 myapp/0002 otherapp/0001
auth/0001 contenttypes/0001 thirdapp/0001 ???
what? Your migration dependencies on swappable models myapp/0001 myapp/0002 otherapp/0001
auth/0001 contenttypes/0001 thirdapp/0001 ???
Unmigrated Apps
Test persistence
Test persistence on MySQL
Random Meta options order_with_respect_to? Really?
Proxy Models
But we're close! Django 1.7, coming to a server near
you soon.
Thanks! Andrew Godwin
[email protected]