DB Migration Sheriff
Workflow
- •Define schema delta. Specify exact create alter drop operations and affected services.
- •Generate migration pair. Create forward and rollback migrations together. Keep migration names timestamped and purpose-specific.
- •Evaluate runtime risk. Assess table lock risk, index build strategy, and backfill batching. Plan for long-running operations with phased rollout.
- •Validate on realistic data. Run migration up and down in staging-like conditions. Measure execution time and check query plans where relevant.
- •Release guardrails. Document deploy order, feature flags, and recovery procedure.
Output Contract
Always include:
- •Up and down migration paths.
- •Lock and performance risk assessment.
- •Rollback trigger conditions.
- •Verification commands and observed timings.