Multiple ChoiceHard 45s
Expand-contract: safe schema evolution
Which sequence correctly describes the expand-contract pattern for a breaking database change?
Options
- 1Add the new structure (expand), dual-write and migrate, then remove the old structure (contract)
- 2Drop the old column first, then add the new one and backfill it from the backups
- 3Rename the column in a single migration so that all readers switch over at once
- 4Take the service fully offline for the whole change so no partial state is visible
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.