DjangoCon 2008 Panel: Schema Evolution
summary
Three different migration systems get shown: Demigrations stores raw SQL files with up/down methods, runs manage.py demigrate up/down, and the team reports 14 developers and ~350 migrations in use; South generates Python migrations from Django fields, adds DB independence and a dependency resolver and currently targets Postgres/MySQL (SQLite/Oracle work planned); Django Evolution diffs model signatures, emits hinted or stored mutations and validates them. All warn that DDL may not roll back on MySQL, so backups and staging tests are required.
AI-written summary · about
chapters (4)
- 0:00Start
- 18:35Pickled summary of Django model • Stores state of Django models at syncdb • Can be diffed against current models • Diffs used to generate hints
- 21:20Best guess at changes required • Can be executed immediately • Can be used as prototype Stored evolution • Can't resolve ambiguous updates (rename) • Can't fill in the blanks (initial data)
- 25:06Core of approach: Hint and Tweak (!magic) • Simple changes without user intervention • Easy entry for customization, raw SQL • Self documenting self auditing • Validation (where possible)
related talks
21mDjango's Migrations: A Retrospective
33mPeaceful Django Migrations with Efe Öge
23mBeyond the Basics of Migrations
31mSpace Django: Migrating and Redesigning a Database while Hunting for Satellites.
21mMigrating to Success: Unleashing the Power of Django Migrations
36mUp And Down Again: A Migration's Tale
29mMigrating Data Quickly and Safely
29mYour database migrations are bad and you should feel bad
