SQL migrations
When to use
- Add a nullable column to the users table without downtime
- Plan a schema change for the orders table
- Write a rollback script for this migration
- Review this Postgres migration for locking problems
Procedure
- Classify the change as additive, destructive, or rewriting.
- Choose the zero-downtime pattern.
- Emit forward and rollback scripts.