database-migrations

Plan zero-downtime PostgreSQL and MySQL schema migrations with rollback safeguards.

26|1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/BinyaminEden/claude-combine --skill database-migrations-binyamineden
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/BinyaminEden/claude-combine/tree/main/skills/database-migrations
Command: npx skills add https://github.com/BinyaminEden/claude-combine --skill database-migrations-binyamineden

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unsafe, unplanned database schema and data changes cause production outages, data corruption, and extended downtime, disrupting services and risking irreversible data loss for engineering teams.

Core Features & Use Cases

  • Production-grade safety guardrails: Enforces immutable migrations, separate schema and data changes, and pre-deployment safety checklists to eliminate human error in production database updates.
  • Zero-downtime deployment patterns: Implements the expand-contract strategy for schema changes, concurrent index creation, and batch data backfills to avoid service interruptions during updates.
  • Multi-ORM and database support: Provides workflow examples and best practices for PostgreSQL, MySQL, Prisma, Drizzle, Kysely, Django, TypeORM, and golang-migrate.
  • Use Case: A SaaS platform needs to add a new user profile column and backfill existing user data without downtime. This skill guides the team through the safe, phased migration process with full rollback safeguards.

Quick Start

Use the database-migrations skill to create a zero-downtime migration to add a nullable avatar_url column to the users table with a concurrent index for PostgreSQL, including a backfill plan for existing rows.

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?

Zero-downtime database migrations in PostgreSQL require the expand-contract strategy, concurrent index creation, and batch processing for data backfills to avoid locking tables and disrupting production services.

What is the expand-contract strategy for schema changes?

The expand-contract strategy separates schema changes into expansion phases that add new structures without breaking existing code, and contraction phases that remove deprecated structures after application deployment.

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

Yes, the zero-downtime migration approach supports workflow examples and best practices for Prisma, TypeORM, Drizzle, Kysely, Django, and golang-migrate across PostgreSQL and MySQL databases.

How do I backfill existing user data without causing production downtime?

Backfilling existing user data without downtime requires batch processing for large-table data migrations, ensuring the database updates rows incrementally rather than locking the entire table during the operation.

Why should database schema and data changes be separated during migrations?

Separating database schema and data changes enforces production-grade safety guardrails, ensuring immutable migrations and preventing data corruption or extended downtime caused by executing complex updates simultaneously.