Skip to content
affaan-m avatar

Database Migrations

Schema migration patterns for PostgreSQL, Prisma, Drizzle, Kysely, Django, and golang-migrate with zero-downtime and rollback guidance.

CCM score
80 of 100
skills.sh installs
14.1K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers forward-only production changes, expand-contract renames, concurrent indexes, and batched backfills for large tables
  • Includes runnable self-checking PostgreSQL examples for adding columns and renaming columns with reconciliation and retries
  • Enforces separating schema and data migrations and making deployed migrations immutable, with a pre-apply safety checklist
  • Designed for teams running production databases that need to ship schema changes without downtime or manual edits

Install

$ npx -y skills add affaan-m/ecc --skill database-migrations -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Database Migration Patterns

Safe, reversible database schema changes for production systems.

When to Activate

  • Creating or altering database tables
  • Adding/removing columns or indexes
  • Running data migrations (backfill, transform)
  • Planning zero-downtime schema changes
  • Setting up migration tooling for a new project

Core Principles

  1. Every change is a migration — never alter production databases manually
  2. Migrations are forward-only in production — rollbacks use new forward migrations
  3. Schema and data migrations are separate — never mix DDL and DML in one migration
  4. Test migrations against production-sized data — a migration that works on 100 rows may lock on 10M
  5. Migrations are immutable once deployed — never edit a migration that has run in production

Migration Safety Checklist

Before applying any migration:

Details

Repository
github.com/affaan-m/ecc
Categories
Databases, DevOps & Cloud
First seen
Jul 14, 2026

Questions

What does the database-migrations skill help with?

The database-migrations skill covers safe, reversible database schema changes for production systems. It gives patterns for forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, and batched backfills, with workflows for PostgreSQL, Prisma, Drizzle, Kysely, Django, and golang-migrate.

How do I install the database-migrations skill?

Run npx -y skills add affaan-m/ecc --skill database-migrations -y in your project to install it. Once installed, the agent can plan and write migrations that add columns or indexes to large tables and prepare zero-downtime deploys.

Where does database-migrations rank among database skills?

It is in the Databases category and ranks in the top 50 there. Other skills in that category include supabase-postgres-best-practices and several Prisma skills, while this one focuses on migration safety rather than client APIs or setup.

More from affaan-m/ecc

All 257

Similar to Database Migrations

More Databases