| name | schema-migration-review |
| description | Review schema and migration changes for safety, reversibility, rollout risk, and data integrity. Trigger when schema files or migrations change. |
| owner | any |
| trigger | schema_changed |
| version | 2 |
Schema Migration Review
Use this when schema or migration files change.
Workflow
- Identify the exact schema change:
new tables, dropped columns, renamed fields, new constraints, backfills, or index changes.
- Check safety risks:
- destructive operations without a rollback or recovery plan
NOT NULL additions on existing data
- data rewrites or backfills that may fail mid-flight
- long-running or locking index/table changes
- Check reversibility:
can the migration be rolled back, or is the forward-only nature at least documented?
- Check rollout assumptions:
whether old and new application versions can coexist during deploy.
- Report data-loss or deploy-order risks explicitly.
Report
- change summary
- safety concerns
- rollback story
- rollout or sequencing concerns
This skill is about migration safety, not just scanning for SQL keywords.
Before finalizing, for each risk you report, cite the exact migration line(s) that support it, state whether rollback is possible, and note any required deployment sequencing or compatibility checks. If a point cannot be verified from the files, say so explicitly instead of inferring. Do not report risks that cannot be tied to specific lines.