
Database Migration Patterns
Guides the agent through safe, reversible database schema changes and zero-downtime migrations
- Repository
- affaan-m/ECC
- Stars
- 295,127
- Licence
- MIT
- Files
- 1 file
What it does
When you ask the agent to change a database (add a column, create a table, add an index, backfill data), this skill makes it follow established safety practices. It covers PostgreSQL and MySQL and common tools such as Prisma, Drizzle, Kysely, Django, TypeORM and golang-migrate. The agent is guided to write reversible migrations, keep schema and data changes separate, avoid table-locking operations on large tables, and test against production-sized data before deploying.
Great for
- Backend developers changing a live production database
- Teams planning zero-downtime schema changes on large tables
- Developers setting up migration tooling for a new project
Skip it if
- Quick throwaway prototypes where losing data or downtime does not matter, since the checklists add overhead
- Anyone expecting the skill to run migrations or connect to a database; it only supplies guidance and examples
- Databases outside the listed engines and tools, where the advice may not apply directly
Try asking
- “Add a nullable avatar_url column to the users table without locking it”
- “Write a safe migration that adds an index on a 10M-row orders table”
- “Plan a zero-downtime rename of a column used by a live service”
- “Set up golang-migrate for a new Go project with up and down files”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
database-migrations.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip database-migrations.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip database-migrations.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Give the agent your ORM or migration tool name and database version so it picks the correct syntax, for example Postgres 11 or later.
- Review generated migrations before running them against production, since the agent may still produce a locking statement.
- Ask for a rollback plan explicitly when the change is hard to reverse, such as dropping a column.
What's inside
- SKILL.md
Redistributed unmodified from affaan-m/ECC under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.