seniorDevOps
Zero-Downtime Database Migrations.
Updated Apr 28, 2026
Short answer
Changing database schemas in production without locking tables or causing application downtime.
Deep explanation
It requires the Expand and Contract pattern. 1) Expand: Add the new column/table without modifying the old one. 2) Deploy app v2: Writes to both old and new, reads from old. 3) Backfill data from old to new. 4) Deploy app v3: Reads and writes only to new. 5) Contract: Drop the old column.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro