Strategies for Reliable Database Schema Migrations
summary
A real outage occurs when an enum alter triggers a full table rewrite and a lock that lasts around four hours; the recovery shows human review and CI missed that risk. The solution is Database schema as code with a planner and Atlas’s migration analysis engine that flags destructive and backward-incompatible changes, plus unit tests for DB logic, data-migration tests, CI-time warnings and migration checks (txar) that run pre-deploy — these catch risky alters before production.
AI-written summary · about
chapters (11)
- 0:00Introduction and Speaker Background
- 1:04Developer Horror Story: A Migration Gone Wrong
- 4:23Postmortem Analysis: Understanding the Outage
- 6:45The Importance of Reliable Schema Changes
- 7:45Strategy 0: Automate Your Schema Changes
- 9:40Strategy 1: Database Schema as Code
- 12:06Strategy 2: Testing Database Logic with Unit Tests
- 14:58Strategy 3: Testing Data Migrations
- 17:42Strategy 4: Automating Risk Detection in Migrations
- 24:14Strategy 5: Pre-Migration Checks
- 25:52Conclusion and Recap of Strategies
related talks
28mSchema-as-Code: Developer platforms and database schema changes
33mDatabase Schema Migrations with Zero Downtime
37mDatabase Schema Migrations with Zero Downtime
59mNavigating the Challenges of CI /CD for Relational Database Schema Changes
31mHelp! My Database Is The Bottleneck
35mDatabase migrations without downtime
33mAvoid Toll Roads: Deploying Declarative Database Schema Changes
40mrails db:migrate:safely
