Peaceful Django Migrations with Efe Öge
summary
Explains two concrete causes of deployment outages: schema-version mismatch during rolling deploys (old servers writing rows the new code doesn’t expect) and long blocking locks from migrations (example: a migration stuck ~300 seconds). Gives specific Postgres details — Postgres 11 avoids a blocking ALTER when adding a non-null column with a constant default; indexes must be created CONCURRENTLY to avoid locks — and recommends three tools: django-migration-linter, squawk, and experimental proll (creates shadow schemas, promising but not proven in production). Run linters in CI before deploy.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 3:33Django migrations 101
- 13:03Downtime in deployments
- 17:58Schema mismatch in rolling deployments
- 19:04PostgreSQL locks impact
- 21:11Long-running migrations prediction
- 25:44Automated downtime prevention
- 30:45Summary & Q&A
related talks
29mMigrating Data Quickly and Safely
40mrails db:migrate:safely
33mAdding zero-downtime migrations strategy in SaaS project
57mDjangoCon 2008 Panel: Schema Evolution
25mDeploying Django migrations at Kraken scale with Tim Bell
21mDjango's Migrations: A Retrospective
24mOf Django, PostgreSQL schemas, and your multi-million dollar idea
31mSpace Django: Migrating and Redesigning a Database while Hunting for Satellites.
