Database Migration Language
5 exercises — practise the English vocabulary for database migrations: up/down migration functions, zero-downtime strategies, backfilling, breaking vs. non-breaking changes, and communicating migration risk in pull requests.
Migration vocabulary quick reference
- up() / down(): forward migration and its reversible counterpart
- Zero-downtime rename: expand (add new col) → backfill → dual-write → contract (drop old col)
- Backfill: populating a new column for existing rows in batches
- Breaking change: a schema change that causes errors in the currently running app version
- Non-breaking change: adding a nullable column is safe during rolling deployments
- ACCESS EXCLUSIVE lock: PostgreSQL DDL lock that blocks all reads and writes
Question 1 of