Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Migrations Under The Hood

Migrations Under The Hood

A talk I gave at Django Under The Hood 2014.

Andrew Godwin

November 14, 2014
Tweet

More Decks by Andrew Godwin

Other Decks in Programming

Transcript

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

    of 1.7 Django migrations Senior Software Engineer at Eventbrite Apparently at every Django conference
  2. Makes appA tables migrations Makes appB tables Adds FKs from

    appB to appA Adds FKs from appA to appB
  3. Makes appA tables migrations Makes appB tables Adds FKs from

    appB to appA Adds FKs from appA to appB
  4. create model + delete model = nothing create model +

    create field = create model create field + alter field = create field alter field + delete field = delete field alter field + alter field = alter field
  5. • Autodetector is slow • Optimizer is not great •

    Graph state building is inefficient Room for improvement!