Skip to content

Database Migration Patterns

Guides safe, reversible database schema and data changes for PostgreSQL, MySQL and common ORMs

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

What it does

When installed, the agent follows a set of best practices whenever you ask it to change a database structure, such as adding a column or index, moving data, or planning a deployment with no downtime. It checks changes against a safety checklist (reversible migrations, no full-table locks, nullable or defaulted new columns, separate schema and data changes) and shows how to do it with tools like Prisma, Drizzle, Kysely, Django, TypeORM and golang-migrate. The skill is written in Spanish and consists only of guidance text with code examples.

Great for

  • Backend developers maintaining a production PostgreSQL or MySQL database who want safer schema changes
  • Teams using Prisma, Drizzle or Kysely who need help writing migration files
  • Developers planning zero-downtime column renames or large data backfills

Skip it if

  • Non-developers with no database experience, since the guidance assumes working knowledge of SQL and ORMs
  • Anyone expecting the skill to run migrations automatically: it only advises, and running commands against production can cause data loss or locks if misapplied
  • Projects using databases or ORMs not covered in the file, where the advice may not transfer directly

Try asking

  • “Help me add an avatar_url column to my users table without locking it in production”
  • “Plan a zero-downtime rename of the username column to display_name using expand-contract”
  • “Write a batched Prisma migration that creates an index concurrently”
  • “Review my Drizzle migration for risks before I deploy it”
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 actual schema and row counts so it can judge lock risk realistically
  • Always test suggested migrations against a copy of production data before applying them
  • Ask for the rollback plan explicitly, since the checklist requires one and the skill favours forward-only migrations 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.