Andrew Godwin
Author of South migrations library
Hi, I'm
Author of 1.7 Django migrations
Senior Software Engineer at
Slide 3
Slide 3 text
south migrations for django
south.aeracode.org
DjangoCon 2008
https://speakerdeck.com/andrewgodwin/south-migrations-for-django
Slide 4
Slide 4 text
Migrations:
They're pretty good.
Slide 5
Slide 5 text
South
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
1.0
Aug 2008
Aug 2008
Sep 2008
Jan 2009
Apr 2009
Jun 2009
Mar 2010
May 2013
Jul 2014
Slide 6
Slide 6 text
The Early Years
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
1.0
Aug 2008
Aug 2008
Sep 2008
Jan 2009
Apr 2009
Jun 2009
Mar 2010
May 2013
Jul 2014
Slide 7
Slide 7 text
Approaching Stability
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
1.0
Aug 2008
Aug 2008
Sep 2008
Jan 2009
Apr 2009
Jun 2009
Mar 2010
May 2013
Jul 2014
Well, in the short term,
South 1.0 will be released.
“
“
June 2010
Slide 8
Slide 8 text
The Long Gap & Kickstarter
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
1.0
Aug 2008
Aug 2008
Sep 2008
Jan 2009
Apr 2009
Jun 2009
Mar 2010
May 2013
Jul 2014
Slide 9
Slide 9 text
Today
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
1.0
Aug 2008
Aug 2008
Sep 2008
Jan 2009
Apr 2009
Jun 2009
Mar 2010
May 2013
Jul 2014
Slide 10
Slide 10 text
For at least a year now, people have
been suggesting to me that South
should be in Django core.
“
“
June 2010
Slide 11
Slide 11 text
The Initial Plan
Django
Schema backend
ORM Hooks
South 2
Migration handling
User interface
Slide 12
Slide 12 text
The Revised Plan
Django
Schema backend
ORM Hooks
South 2
Migration handling
User interface
Backport for 1.4 - 1.6
Slide 13
Slide 13 text
The Revised Revised Plan
Django
Schema backend
ORM Hooks
Migration handling
User interface
Slide 14
Slide 14 text
Moving South into Django
instead, "Adding migrations to Django"
Slide 15
Slide 15 text
Logically Separate
SchemaEditor
Schema Migrations
field.deconstruct()
ModelOptions.apps
Operations
Loader / Graph
Executor
Autodetector
Optimiser
State
Slide 16
Slide 16 text
Operations & State
Slide 17
Slide 17 text
Operations are a declarative
representation of model changes
State is an in-memory representation
of entire project state
Slide 18
Slide 18 text
State State
Operation
AddModel
No Models 1 Model
Slide 19
Slide 19 text
State State
Operation
State
Operation
State
Operation
State
Operation
Migration 1 Migration 2