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
Andrew Godwin
August 01, 2014
Programming
320
2
Share
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
390
Django Through The Years
andrewgodwin
0
310
Writing Maintainable Software At Scale
andrewgodwin
0
520
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
420
Async, Python, and the Future
andrewgodwin
2
730
How To Break Django: With Async
andrewgodwin
1
800
Taking Django's ORM Async
andrewgodwin
0
810
The Long Road To Asynchrony
andrewgodwin
0
760
The Scientist & The Engineer
andrewgodwin
1
840
Other Decks in Programming
See All in Programming
Moments When Things Go Wrong
aurimas
3
120
1人1案件のプロダクトエンジニア時代に、"プロセス監督"としてチャレンジしたこと
non0113
0
330
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
120
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
160
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.1k
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
310
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
210
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
2.2k
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
990
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
130
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
2.8k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
240
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
240
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
270
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Become a Pro
speakerdeck
PRO
31
5.9k
Marketing to machines
jonoalderson
1
5.3k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
750
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.2k
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
240
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
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]