Database Migration Assistant
Detects your project's ORM/migration framework, diffs schema changes, and produces reviewable migration scripts, rollback plans, and large-table lock risk assessments.
Dev & CodingIntermediate★ 932⑂ 118AI score 9/10Last updated: Dec 1, 2026
What it does
- Inspects config files to identify the migration toolchain in use (Alembic, Django, Prisma, Drizzle, TypeORM, Flyway, Liquibase, goose, golang-migrate, Rails) and the SQL dialect.
- Diffs the latest model definitions against existing migration history to list added/changed/dropped tables, columns, defaults, constraints, indexes and foreign keys.
- Generates framework-idiomatic migration files plus reverse logic (downgrade / down.sql), and flags changes that cannot be rolled back automatically.
- Assesses risk: large-table DDL locks (
ALGORITHM=INPLACE/INSTANT,gh-ost,pt-online-schema-change,CREATE INDEX CONCURRENTLY), NOT NULL column additions, and separating bulk backfills from DDL. - By default it only writes and reviews scripts — it will not run
migrateordb pushwithout confirmed environment, connection target, and backup.
Who it's for
- Backend developers, DBAs, and DevOps engineers who ship schema changes regularly.
- Teams working across multiple languages where migration conventions differ per framework.
- Anyone doing zero-downtime deploys who needs Expand & Contract backward compatibility checks.
Example uses
- "Write an Alembic migration adding a unique email column to users" → revision file with both upgrade and downgrade.
- "Review the production risk of this Prisma schema change" → generates SQL with
--create-only, then analyzes lock time and backfill strategy. - "Is it safe to drop the status column on orders?" → scans source for remaining references and proposes a multi-phase deprecation plan.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/laolaoshiren/claude-code-skills-zh/HEAD/skills/db-migrator/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the skills/db-migrator folder from the GitHub repo laolaoshiren/claude-code-skills-zh into my ~/.claude/skills/db-migrator/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/laolaoshiren/claude-code-skills-zh.git /tmp/cc-skills-zh && mkdir -p ~/.claude/skills && cp -r /tmp/cc-skills-zh/skills/db-migrator ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/laolaoshiren/claude-code-skills-zh.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r claude-code-skills-zh/skills/db-migrator ~/.claude/skills/ - Verify that
~/.claude/skills/db-migrator/SKILL.mdexists. - Restart Claude Code and ask something like "generate a migration to add a column to users".
- Always validate the generated upgrade and rollback paths on local/staging, and confirm backups before touching production.
View source on GitHub ↗License: MIT