Docker and CI/CD · Middle · Question 53 of 75
Why should database migrations stay backward compatible during a deploy?
- ✓Correct answer: Old and new app versions run at the same time during rollout
- 2Migrations can only add tables, never change existing ones
- 3Databases reject migrations that remove any columns
Explanation
In a rolling or blue-green deploy, the old code still runs against the new schema. Expand-and-contract: add first, migrate data, remove later.