Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

DB Migration Assistant

Detects your project's migration framework, diffs the schema, generates migration plus rollback scripts, and flags risky DDL before you run anything.

Dev & CodingIntermediate78583AI score 9/10Last updated: Aug 22, 2026

What it does

  • Scans project files (alembic.ini, prisma/schema.prisma, pom.xml, manage.py, db/migrate/) to identify the ORM/migration framework in use.
  • Diffs model definitions against migration history to surface added, modified and dropped tables, columns, indexes, constraints and foreign keys.
  • Emits framework-specific migration files together with a matching rollback/downgrade script.
  • Assesses risk: table-locking DDL on large tables, data backfill needs, and backward compatibility.
  • Defaults to generate-and-review only; execution waits for your explicit confirmation.

Who it's for

  • Backend engineers working with Alembic, Prisma, Flyway, Django or Rails.
  • Tech leads and DBAs who want safer production schema changes.
  • Anyone who has shipped a migration without a rollback plan.

Examples

  • "Add a unique email column to users" → Alembic upgrade/downgrade functions generated for you.
  • "I changed schema.prisma, show me the SQL first" → uses --create-only so you can review before applying.
  • "Change a column type on a 50M-row table" → warns about locking, suggests online DDL tooling and data-loss caveats.

· · · 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude 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 && mkdir -p ~/.claude/skills && cp -r claude-code-skills-zh/skills/db-migrator ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/laolaoshiren/claude-code-skills-zh.git
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r claude-code-skills-zh/skills/db-migrator ~/.claude/skills/
  5. Verify that ~/.claude/skills/db-migrator/SKILL.md exists.
  6. Restart Claude Code and ask something like "generate a migration for this schema change".
  7. Always validate generated migrations on staging and take a backup before touching production.