database-migrations

Apply safe, reversible database migrations with expand-contract workflows.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing and applying database migrations safely in production is error-prone without best practices and tooling.

Core Features & Use Cases

  • Safe, reversible schema changes with UP/DOWN migrations
  • Zero-downtime deployment patterns like expand-contract
  • Guidance for Prisma, Drizzle, Django, TypeORM, and golang-migrate

Quick Start

Follow the expand-contract pattern to introduce a new change safely with zero downtime.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
What is the expand-contract pattern for zero-downtime database migrations?

The expand-contract pattern separates schema changes into expand phases that add new structures and contract phases that remove old ones, enabling zero-downtime database migrations without locking tables or breaking running application code.

How do I perform safe schema changes and rollbacks in PostgreSQL?

Safe schema changes and rollbacks in PostgreSQL require reversible UP and DOWN migrations, separating data migrations from schema migrations, and applying expand-contract workflows to ensure auditable, zero-downtime deployments.

Does this database migration approach work with Prisma, Drizzle, and TypeORM?

Yes, the database migration approach applies to common ORMs including Prisma, Drizzle, TypeORM, and Django, providing safe migration patterns and enforcing UP/DOWN rules and expand-contract workflows across these tools.

Why should I separate data migrations from schema migrations?

Separating data migrations from schema migrations prevents locking conflicts and application errors during deployment, allowing schema changes to execute safely first while data backfilling occurs independently under zero-downtime constraints.

What's the best way to handle risky production database migrations?

The best way to handle risky production database migrations is enforcing safety rules such as UP/DOWN reversibility, separate data and schema migrations, and expand-contract deployment workflows using tooling like golang-migrate for auditable changes.

When should I not use a zero-downtime migration approach?

Zero-downtime migrations using expand-contract are unsuitable when immediate, destructive schema changes are required or when the application cannot support backward-compatible deployment phases needed for safe, reversible transitions.