---
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.
