database-migrations
SKILL.md
Database Migration Patterns
Schema Evolution Strategies
| Strategy | Risk | Downtime | Best For |
|---|---|---|---|
| Additive-Only | Very Low | None | APIs with backward-compatibility guarantees |
| Expand-Contract | Low | None | Renaming, restructuring, type changes |
| Parallel Change | Low | None | High-risk changes on critical tables |
| Lazy Migration | Medium | None | Large tables where bulk migration is too slow |
| Big Bang | High | Yes | Dev/staging or small datasets only |
Default to Additive-Only. Escalate to Expand-Contract only when you must modify or remove existing structures.
Zero-Downtime Patterns
Every production migration must avoid locking tables or breaking running application code.