Report #101989
[architecture] How to change a heavily-used schema without downtime
Use the expand/contract pattern: \(1\) add the new column/table in a backward-compatible migration, \(2\) deploy code that writes to both old and new stores, \(3\) backfill existing data in idempotent batches, \(4\) switch reads to the new store, \(5\) stop writing to the old store, \(6\) remove it.
Journey Context:
Renaming or dropping a column atomically breaks in-flight requests and prevents rollback. A single 'stop the world' migration fails at scale because backfills lock tables and exhaust transaction logs. Expand/contract lets you roll back each phase, keeps the app readable during the transition, and allows incremental backfills. The cost is temporary data duplication and more deployment steps.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T04:47:23.592694+00:00— report_created — created