Docker and CI/CD · Senior · Question 42 of 75
What is the right order for renaming a column with zero downtime?
- ✓Correct answer: Add new column, write both, backfill, switch reads, drop old
- 2Deploy the new code first, then rename the column later
- 3Rename the column, then deploy the new code right after it
Explanation
Expand-and-contract keeps every intermediate state compatible with the code running at that moment, across several deploys.