database-migrations

Plan reversible PostgreSQL and MySQL schema migrations with zero-downtime expand-contract patterns.

Updated May 9, 2026
One-click install
npx skills add https://github.com/RambleRainbow/jd --skill database-migrations-ramblerainbow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/RambleRainbow/jd/tree/main/.claude/skills/database-migrations
Command: npx skills add https://github.com/RambleRainbow/jd --skill database-migrations-ramblerainbow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the risk of production outages, data corruption, and extended downtime caused by unplanned, manual, or poorly executed database schema and data migrations.

Core Features & Use Cases

  • Production-safe migration patterns: Provides vetted, reversible workflows for schema changes, data backfills, and concurrent index creation across PostgreSQL, MySQL, and common ORMs including Prisma, Drizzle, Django, TypeORM, and golang-migrate.
  • Zero-downtime deployment support: Implements the expand-contract pattern to deploy schema changes without interrupting live user traffic.
  • Use Case: For example, if you need to add a non-null column to a 10 million row user table, this Skill guides you through adding it as nullable, backfilling data in small batches, and adding the not-null constraint without locking the table or taking the service offline.

Quick Start

Use the database-migrations skill to plan and execute a zero-downtime schema change to add a new non-null column to your production users table.

Frequently Asked Questions about database-migrations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a non-null column to a large PostgreSQL table without locking it?

To add a non-null column to a large PostgreSQL table without locking, apply an expand-contract pattern: add the column as nullable, backfill data in small batches, then add the not-null constraint. This zero-downtime migration approach prevents production outages on large datasets.

What is the expand-contract pattern for zero-downtime database schema changes?

The expand-contract pattern is a zero-downtime migration strategy that separates schema changes into expand phases, which add new structures without breaking existing code, and contract phases, which remove obsolete structures after deployment. This ensures continuous user traffic during database updates.

Does this zero-downtime migration approach work with Prisma and Django?

Yes, this zero-downtime migration approach works with Prisma, Drizzle, Django, TypeORM, and golang-migrate. It provides vetted, reversible migration patterns and pre-apply safety checklists tailored for both PostgreSQL and MySQL environments using these ORMs.

How do I safely backfill data in MySQL during a production migration?

To safely backfill data in MySQL during a production migration, execute the data backfill in small batches. This technique minimizes table locking and user traffic impact, ensuring your schema changes remain reversible and production-safe throughout the migration workflow.

Why do concurrent index creation and manual schema changes cause production outages?

Manual schema changes and poorly executed concurrent index creation cause production outages by unexpectedly locking tables or corrupting data. Unplanned database migrations disrupt live user traffic, which is why vetted, reversible migration patterns and pre-apply safety checklists are required.

What are the limitations of taking a service offline for database migrations?

Taking a service offline for database migrations causes extended downtime and disrupts live user traffic. The limitation is service unavailability, which is avoidable by using zero-downtime deployment workflows that implement expand-contract strategies and batch data backfills for continuous operation.