DM
Database Migration Plan
🔵 Stable🕐 updated 2026-06-08
🔷 SkillSpec L3
pm-engineering
Write a safe, zero-downtime database migration plan for a schema change. Use when asked to plan a database migration, design a zero-downtime schema change, document an expand/contract migration, produce a rollback procedure for a database change, or coordinate a database schema update with a deployment. Produces a structured migration plan covering migration objectives, backward compatibility analysis, expand/contract phase breakdown, exact SQL, rollback steps per phase, data validation queries, and a deployment runbook.
What to give it
▸Current schema state — the DDL or description of the table(s) as they are now
▸Target schema state — the DDL or description of what the table(s) should look like after migration
▸Migration reason — why this change is being made (new feature, performance fix, normalization, compliance)
▸Database engine — PostgreSQL, MySQL, SQLite, CockroachDB, etc.
▸Estimated data volume — approximate number of rows in affected tables
▸Deployment constraints — is any downtime allowed? What is the expected traffic level during migration? Are there multiple app instances running?
▸Rollback window — how long after deploy can the team roll back before the migration becomes irreversible?
✅ The bar it holds itself to
Every skill in this library self-verifies — these are this skill's own quality checks, straight from its definition.
✓Every migration phase has an independent rollback procedure — no phase assumes the next one has run
✓Batch backfill script includes a pause between batches to avoid saturating I/O
✓NOT NULL constraints use the NOT VALID + VALIDATE pattern on tables with >100k rows
✓The app dual-write period is explicitly defined — old column writes are not dropped until Phase 3 is deployed
✓Data validation queries include a row count check to confirm no data loss
✓Lock types are identified for every DDL statement — no "should be fine" assumptions
✓The deployment runbook names who runs each step, not just what to run
✓Phase 4 (contract) is explicitly gated on the rollback window passing — not run on the same day as Phase 3
⚠️ What it refuses to do
Do not combine the expand and contract phases into a single deployment — they must be separated by a deployment cycle
Do not run DDL changes without first testing on a production-sized data clone
Do not skip the NOT VALID + VALIDATE pattern for constraint additions on large tables — it causes full table locks
Do not define a rollback as "restore from backup" — each phase must have an explicit, fast rollback procedure
Do not omit dual-write logic during the transition period — removing the old column before all writers are updated causes data loss
Install
npx pm-claude-skills add --agent claude # or codex · cursor · gemini · hermes
# or one-line MCP (every skill, any client):
claude mcp add pm-skills -- npx -y pm-claude-skills-mcp
Start with
Related skills
🔌 Embed this skill
Drop this on your blog, docs, or site — it renders a "Run this skill" card:
<div data-pm-skill="database-migration-plan"></div>
<script src="https://mohitagw15856.github.io/pm-claude-skills/embed.js" async></script>
💬 Discussion
Database Migration Plan is one of 1078 open-source professional AI agent skills — all SkillSpec L3.
Try them all in the browser · ⭐ Star on GitHub · Browse the full catalog