Skip to content

Database Migration Patterns

Plan safe, reversible database schema changes with zero-downtime patterns

Repository
affaan-m/ECC
Stars
295,127
Licence
MIT
Files
1 file

What it does

When installed, the agent follows a set of established practices for changing a database's structure, such as adding columns or indexes, moving data, and rolling back changes. It checks each planned change against a safety checklist (for example, avoiding table locks on large tables, adding new columns as nullable or with defaults, and splitting schema and data changes) and gives commands and examples for PostgreSQL and tools like Prisma, Drizzle, and Django. It does not connect to your database itself; it guides the work you or the agent do.

Great for

  • Developers planning schema changes on a live production database
  • Teams setting up migration tooling for a new project using Prisma, Drizzle, or Django
  • Engineers who need to rename or drop columns without taking the application offline

Skip it if

  • Projects with no production database or only trivial schema needs, where the checklist adds overhead
  • Databases other than the PostgreSQL, MySQL, and ORMs covered, since guidance for others will be generic
  • Anyone expecting the skill to run migrations automatically; it only provides guidance and examples, and running the commands against production could cause locks or data loss if applied without review

Try asking

  • “Plan a zero-downtime migration to rename the username column to display_name in PostgreSQL”
  • “Review this Prisma schema change and tell me whether the index creation will block writes”
  • “Write a Django data migration that backfills a new field in batches of 5000 rows”
  • “Create a safe rollback plan for adding a NOT NULL column to our orders table”
Step-by-step guide: how to use Database Migration PatternsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    database-migrations.zip
  2. 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. 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 database engine, ORM, and approximate table sizes so it can judge lock risk correctly
  • Always test the suggested migration against a copy of production data before running it anywhere real
  • Ask the agent to write the DOWN or rollback step explicitly, since the skill favours forward-only fixes in production

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.