A talk I gave at DjangoCon AU 2014.
Andrew Godwin@andrewgodwinmigrations:a retrospective
View Slide
Andrew GodwinAuthor of South migrations libraryHi, I'mAuthor of 1.7 Django migrationsI like my tea iced, and my schemas explicit
Django/Python backendI work forDiscovery? Mobile? Storage? UI?On-site? ...auditing? We have it all.We're hiring!
MigrationsThey're pretty good.
South...it was good for its time
The Initial PlanDjangoSchema backendORM HooksSouth 2Migration handlingUser interface
The Revised PlanDjangoSchema backendORM HooksSouth 2Migration handlingUser interfaceBackport for 1.4 - 1.6
The Revised Revised PlanDjangoSchema backendORM HooksMigration handlingUser interface
Logically SeparateSchemaEditorSchema Migrationsfield.deconstruct()ModelOptions.appsOperationsLoader / GraphExecutorAutodetectorOptimiserState
makemigrationsfield.deconstruct()Loader / GraphAutodetector OptimiserStateWriter12State354
migrateSchemaEditorModelOptions.appsOperationsLoader / Graph ExecutorState1 2Recorder3
Moving South into Djangoinstead, "Adding migrations to Django"
A New FormatMore conciseDeclarativeIntrospectable
Migration actionsFrozen ORM
In-memory runningCreates models from migration setsAutodetector diffs created from on-diskUsed to feed SchemaEditor / ORM
But what went wrong?
Swappable Models
Your migration dependenciesmyapp/0001myapp/0002otherapp/0001auth/0001contenttypes/0001
myapp/0001myapp/0002otherapp/0001auth/0001contenttypes/0001thirdapp/0001Your migration dependencieson swappable models
what?Your migration dependencieson swappable modelsmyapp/0001myapp/0002otherapp/0001auth/0001contenttypes/0001thirdapp/0001???
Unmigrated Apps
Test persistence
Test persistenceon MySQL
Random Meta optionsorder_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]