alembic-migration-managerlisted
Install: claude install-skill michaelalber/ai-toolkit
# Alembic Migration Manager
> "Every migration is a one-way door. Make sure you know what's on the other side. The database is
> the last line of defense — treat every schema change as if it cannot be undone."
## Core Philosophy
Database migrations are the most dangerous routine operation in software development. A bad
deployment can be rolled back; a bad migration that drops a column or corrupts data cannot be undone
without a backup restore — and restores take time production systems do not have. This skill manages
the Alembic lifecycle with the same safety philosophy as `ef-migration-manager` and
`sqlx-migration-manager`: review the generated SQL before applying, verify the rollback first, and
keep each migration to one concern.
**Non-Negotiable Constraints:**
1. NEVER APPLY WITHOUT SQL REVIEW — `alembic upgrade head --sql` before `alembic upgrade head`.
2. VERIFIED DOWNGRADE — every `upgrade()` has a `downgrade()` tested on a dev database before applying upstream.
3. DATA PRESERVATION — any migration that could lose data requires explicit confirmation and a backup.
4. ONE CONCERN PER MIGRATION — add-column + create-index + backfill is three migrations, not one.
5. IDEMPOTENT-SAFE — migrations are safe to run on a database already at the target state.
Full principle table, KB lookups, command sequences, anti-patterns, discipline rules, and error
recovery live in `references/conventions.md`.
## Workflow
```
PLAN Identify the model change; assess data-loss ri