Digging Into Django's Migrations

077e9a0cb34fa3eba2699240c9509717?s=47 Andrew Godwin
September 03, 2014

Digging Into Django's Migrations

My keynote from DjangoCon US 2014

077e9a0cb34fa3eba2699240c9509717?s=128

Andrew Godwin

September 03, 2014
Tweet

Transcript

  1. 2.

    Andrew Godwin Author of South migrations library Hi, I'm Author

    of 1.7 Django migrations Senior Software Engineer at
  2. 5.

    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
  3. 6.

    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
  4. 7.

    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
  5. 8.

    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
  6. 9.

    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
  7. 10.

    For at least a year now, people have been suggesting

    to me that South should be in Django core. “ “ June 2010
  8. 11.
  9. 12.

    The Revised Plan Django Schema backend ORM Hooks South 2

    Migration handling User interface Backport for 1.4 - 1.6
  10. 17.

    Operations are a declarative representation of model changes State is

    an in-memory representation of entire project state
  11. 27.
  12. 31.

    Compares two States and outputs a set of operations to

    perform Operations have own dependencies and resolver
  13. 32.

    Model A Model A w/FK, Model B diff AddModel(B) AddField(A,

    "b", FK(B)) dependency sort AddModel(B) AddField(A, "b", FK(B)) BEFORE AFTER
  14. 34.

    Takes one set of Operations and outputs another with the

    same effect Steps over pairs and checks if they combine and what they pass over
  15. 38.