Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Andrew Godwin @andrewgodwin migrations: a retrospective
Slide 2
Slide 2 text
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
Slide 3
Slide 3 text
Django/Python backend I work for Discovery? Mobile? Storage? UI? On-site? ...auditing? We have it all. We're hiring!
Slide 4
Slide 4 text
Migrations They're pretty good.
Slide 5
Slide 5 text
South ...it was good for its time
Slide 6
Slide 6 text
The Initial Plan Django Schema backend ORM Hooks South 2 Migration handling User interface
Slide 7
Slide 7 text
The Revised Plan Django Schema backend ORM Hooks South 2 Migration handling User interface Backport for 1.4 - 1.6
Slide 8
Slide 8 text
The Revised Revised Plan Django Schema backend ORM Hooks Migration handling User interface
Slide 9
Slide 9 text
Logically Separate SchemaEditor Schema Migrations field.deconstruct() ModelOptions.apps Operations Loader / Graph Executor Autodetector Optimiser State
Slide 10
Slide 10 text
makemigrations field.deconstruct() Loader / Graph Autodetector Optimiser State Writer 1 2 State 3 5 4
Slide 11
Slide 11 text
migrate SchemaEditor ModelOptions.apps Operations Loader / Graph Executor State 1 2 Recorder 3
Slide 12
Slide 12 text
Moving South into Django instead, "Adding migrations to Django"
Slide 13
Slide 13 text
A New Format More concise Declarative Introspectable
Slide 14
Slide 14 text
Migration actions Frozen ORM
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
In-memory running Creates models from migration sets Autodetector diffs created from on-disk Used to feed SchemaEditor / ORM
Slide 17
Slide 17 text
But what went wrong?
Slide 18
Slide 18 text
Swappable Models
Slide 19
Slide 19 text
Your migration dependencies myapp/0001 myapp/0002 otherapp/0001 auth/0001 contenttypes/0001
Slide 20
Slide 20 text
myapp/0001 myapp/0002 otherapp/0001 auth/0001 contenttypes/0001 thirdapp/0001 Your migration dependencies on swappable models
Slide 21
Slide 21 text
what? Your migration dependencies on swappable models myapp/0001 myapp/0002 otherapp/0001 auth/0001 contenttypes/0001 thirdapp/0001 ???
Slide 22
Slide 22 text
what? Your migration dependencies on swappable models myapp/0001 myapp/0002 otherapp/0001 auth/0001 contenttypes/0001 thirdapp/0001 ???
Slide 23
Slide 23 text
Unmigrated Apps
Slide 24
Slide 24 text
Test persistence
Slide 25
Slide 25 text
Test persistence on MySQL
Slide 26
Slide 26 text
Random Meta options order_with_respect_to? Really?
Slide 27
Slide 27 text
Proxy Models
Slide 28
Slide 28 text
But we're close! Django 1.7, coming to a server near you soon.
Slide 29
Slide 29 text
Thanks! Andrew Godwin andrewgodwin@eventbrite.com