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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Andrew Godwin
August 01, 2014
Programming
340
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Django Migrations: A Retrospective
A talk I gave at DjangoCon AU 2014.
Andrew Godwin
August 01, 2014
More Decks by Andrew Godwin
See All by Andrew Godwin
Reconciling Everything
andrewgodwin
1
410
Django Through The Years
andrewgodwin
0
330
Writing Maintainable Software At Scale
andrewgodwin
0
540
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
430
Async, Python, and the Future
andrewgodwin
2
750
How To Break Django: With Async
andrewgodwin
1
830
Taking Django's ORM Async
andrewgodwin
0
860
The Long Road To Asynchrony
andrewgodwin
0
780
The Scientist & The Engineer
andrewgodwin
1
860
Other Decks in Programming
See All in Programming
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
120
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
350
FastAPI の並行処理モデルを完全に理解する
hoto17296
8
2.8k
「人を評価する AI」の設計と実装
ryoyanara
0
220
What's New in Android 2026
veronikapj
0
270
Building a Meta Ray-Ban display app
akkeylab
0
180
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
250
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
3
1.6k
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
180
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
370
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
240
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
500
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
380
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
240
How to build a perfect <img>
jonoalderson
1
5.9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Designing Powerful Visuals for Engaging Learning
tmiket
1
500
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Crafting Experiences
bethany
1
260
The untapped power of vector embeddings
frankvandijk
2
1.8k
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]