database-migrations

Coordinate reversible database migrations across schema and data.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/GGEdu/claude-god-mode-template --skill database-migrations-ggedu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/GGEdu/claude-god-mode-template/tree/main/skills/database-migrations
Command: npx skills add https://github.com/GGEdu/claude-god-mode-template --skill database-migrations-ggedu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safe, reversible database migrations reduce risk during schema changes and data transformations across multiple DB engines and ORMs.

Core Features & Use Cases

  • Migration patterns and best practices for PostgreSQL, MySQL, and popular ORMs (Prisma, Drizzle, Kysely, Django, golang-migrate).
  • Zero-downtime deployment guidance including expand-contract strategy and safe backfills for large data sets.
  • Cross-stack applicability with examples spanning different tech stacks to minimize production incidents.

Quick Start

Run a migration plan that evolves schema and data safely with rollback readiness.

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 require separating schema changes from data migrations, applying expand-contract patterns, and enforcing non-blocking index changes to ensure reversible deployments without disrupting production traffic.

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

The expand-contract pattern expands the database schema first to support both old and new versions, then contracts by removing deprecated columns after application deployment, ensuring safe zero-downtime data backfills and reversible schema changes.

Can I use this migration approach with Prisma, Drizzle, and Django ORM?

Yes, these migration patterns apply cross-stack to Prisma, Drizzle, Kysely, Django, and golang-migrate, providing safety guardrails and schema coordination across multiple database engines and ORMs.

How do I safely backfill large datasets during a database migration?

Safe data backfills during database migrations involve batching data transformations independently of schema changes, avoiding long table locks, and maintaining rollback readiness to prevent production incidents on large datasets.

What are the limitations of blocking index changes in production databases?

Blocking index changes lock database tables during creation, causing production downtime; non-blocking index changes must be enforced to avoid locking issues and minimize migration risk on live systems.

Why do I need to separate schema migrations from data migrations?

Separating schema migrations from data migrations isolates failure points, enables independent rollback for each phase, and enforces safety guardrails that prevent irreversible data loss during complex cross-ORM database deployments.