database-migrations

Apply zero-downtime expand-contract patterns to PostgreSQL and MySQL migrations.

16|3|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/sehoon787/my-claude --skill database-migrations-sehoon787
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/sehoon787/my-claude/tree/main/skills/ecc/database-migrations
Command: npx skills add https://github.com/sehoon787/my-claude --skill database-migrations-sehoon787

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Django, TypeORM, golang-migrate).

Core Features & Use Cases

  • Migration Safety Checklist: ensures UP and DOWN migrations, defaults, non-blocking indexes, and test runs.
  • Zero-Downtime Patterns: expand-contract workflow to safely deploy schema changes with minimal service disruption.
  • ORM & Framework Guidance: practical guidance for Prisma, Drizzle, Django, TypeORM, and golang-migrate workflows across languages.
  • Use Case: a production team migrating user tables with minimal lock time and a clear rollback plan.

Quick Start

Review existing migrations and implement the recommended safeguards and patterns to minimize risk during deployments.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I perform zero-downtime database migrations in PostgreSQL?

The expand-contract pattern enables zero-downtime database migrations by splitting schema changes into multiple deployments: first adding new structures, then migrating data, and finally removing old ones. This minimizes lock time and ensures safe rollbacks.

What is the expand-contract pattern for safe schema changes?

The expand-contract pattern enables zero-downtime database migrations by splitting schema changes into multiple deployments: first adding new structures, then migrating data, and finally removing old ones. This minimizes lock time and ensures safe rollbacks.

Does this database migration guidance work with Prisma and Django ORMs?

Yes, the database migration guidance provides practical workflows for ORMs including Prisma, Django, Drizzle, and TypeORM. It covers framework-specific patterns for safe UP and DOWN migrations across production and staging environments.

How do I backfill data during a production database migration without downtime?

Data backfill during production database migrations requires separating schema changes from data updates using the expand-contract workflow. Batch processing and explicit UP and DOWN migration paths prevent long table locks and service disruption.

What should be included in a database migration safety checklist?

A database migration safety checklist should verify explicit UP and DOWN paths, safe default values, non-blocking index creation, and staging test runs. These safeguards minimize deployment risk across PostgreSQL and MySQL environments.

Why do database migrations cause table locks and how can I avoid them?

Database migrations cause table locks when schema changes alter existing columns or block concurrent operations. Using non-blocking index creation and the expand-contract pattern avoids long locks during zero-downtime production deployments.