database-migrations

Apply expand-contract patterns for zero-downtime database schema migrations.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/Oruga420/claude-code-skills --skill database-migrations-oruga420
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/Oruga420/claude-code-skills/tree/main/database-migrations
Command: npx skills add https://github.com/Oruga420/claude-code-skills --skill database-migrations-oruga420

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safe, reversible database migration patterns for multi-DB environments and ORMs, reducing production risk and downtime.

Core Features & Use Cases

  • Migration safety checklist: enforce UP/DOWN parity, non-destructive changes, and explicit rollback plans.
  • Zero-downtime strategies: apply expand-contract patterns, concurrent indexing, and phased rollouts across engines.
  • Cross-ORM guidance: compatibility notes for Prisma, Drizzle, Django, TypeORM, and golang-migrate workflows.
  • Data backfills and auditing: safe data migrations with backfill patterns and clear rollback paths.

Quick Start

Follow migration best practices by integrating the provided expand-contract patterns into your deployment process.

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 production?

Zero-downtime database migrations apply expand-contract patterns, concurrent indexing, and phased rollouts to evolve schemas without service interruptions. This approach ensures non-destructive changes and explicit rollback plans across multi-tenant or large-scale systems.

What is the expand-contract pattern for database schema migrations?

The expand-contract pattern for database schema migrations involves expanding the schema to support both old and new versions, deploying the application, and then contracting by removing deprecated columns. It enforces UP/DOWN parity and safe data backfills.

Does this approach work with Prisma, Drizzle, and Django ORMs?

Yes, this approach works with Prisma, Drizzle, Django, TypeORM, and golang-migrate workflows. It provides cross-ORM guidance and compatibility notes for applying safe, reversible migration patterns across multi-DB environments.

How do I safely backfill data during a database migration?

To safely backfill data during a database migration, you separate schema and data migrations, apply backfill patterns incrementally, and maintain a clear rollback path. This reduces production risk and ensures data integrity throughout the deployment process.

When do I need to separate schema and data migrations?

You need to separate schema and data migrations when performing complex production rollouts that involve data backfills or concurrent indexing. This separation satisfies UP/DOWN handling requirements and ensures safe, reversible database changes without downtime.