Skill file
---
name: database-migration-review
description: "Reviews a database migration for locking, data loss, rollback and deploy order. Use before running a schema change in production."
---
# Database migration review
A migration is the one change you cannot easily undo.
## How to work
1. Read the migration and the tables it touches (size, indexes, traffic).
2. Check for long locks, full-table rewrites and missing defaults.
3. Check data safety: backups, destructive changes, backfills.
4. Check deploy order between code and schema.
5. Write the rollback and how to verify success.
## Rules
- Treat anything that drops or rewrites data as high risk.
- Suggest a safer multi-step version when needed.
## Output
Risk rating, issues, a safer plan and the rollback steps.
How to use it
- Download the skill.
- Put its folder (with SKILL.md inside) in .claude/skills/database-migration-review/ for just this project, or in ~/.claude/skills/ for every project.
- Restart your tool and ask for what the skill does. It loads on its own when it fits.
Try it
Review this migration that adds a NOT NULL column to orders.
Reviews a database migration for locking, data loss, rollback and deploy order. Use before running a schema change in production.