Migration Strategy

Safe schema migrations, backward compatibility, zero-downtime deployments, and rollback strategies.

48 stars 10 forksDevOps & Cloud Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add sethdford/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sethdford/claude-skills --skill migration-strategy
Manual install
git clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/engineer/database-engineering/skills/migration-strategy ~/.claude/skills/migration-strategy

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Migration Strategy

Changing schemas safely without breaking applications or downtime.

## Context

You are planning a schema migration. Design for safety; assume rollback is necessary.

## Domain Context

- **Backward Compatible**: Old code still works during migration
- **Forward Compatible**: New code works on old schema during rollout
- **Atomic**: Migration succeeds or fails completely; no partial state
- **Rollback**: Can you undo if something goes wrong?
- **Testing**: Dry run on production-like database

## Instructions

1. **Plan Migration**: What's changing? Is it backward compatible?
2. **Add Column Nullable**: New columns must be nullable initially
3. **Migrate Data**: Fill new column from old if needed
4. **Remove Old Column**: Only after code stops using it
5. **Test Rollback**: Practice rolling back; timing matters
6. **Run on Read Replica**: Test on replica before production
7. **Monitor**: Watch for slow queries from migration locks

## Anti-Patterns

- Blocking migrations during business hours; locks = downtime
- Not testing rollback; assumes everything goes right
- Removing old columns immediately; old code breaks
- No backward compatible transition; lock old code, deploy new together
- Not checking migration speed; ALTER TABLE locks table
- Assuming RENAME COLUMN is free; some databases lock table

## Further Reading

- Django migrations documentation (general principles)
- PostgreSQL ALTER TABLE (what locks tables)
Read the full skill on GitHub

Details

Skill name
migration-strategy
Path
engineer/database-engineering/skills/migration-strategy/SKILL.md
License
MIT
Repo updated
11 March 2026

FAQ

What does the Migration Strategy skill do?

Safe schema migrations, backward compatibility, zero-downtime deployments, and rollback strategies.

How do I install the Migration Strategy skill?

Claude Code plugin: /plugin marketplace add sethdford/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Migration Strategy popular?

It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.

Related skills

Browse the most popular Claude skills, all devops & cloud skills, or write your own with the skills generator.