database-migrations

Plan and execute database migrations across PostgreSQL, MySQL, and ORMs.

Updated May 1, 2026
One-click install
npx skills add https://github.com/oguzhanguvenkaya/oguzhan_claude_code_configurations --skill database-migrations-oguzhanguvenkaya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/oguzhanguvenkaya/oguzhan_claude_code_configurations/tree/main/skills/database-migrations
Command: npx skills add https://github.com/oguzhanguvenkaya/oguzhan_claude_code_configurations --skill database-migrations-oguzhanguvenkaya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database migrations are risky and error-prone without a proven approach. This Skill consolidates 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

  • Safe, reversible migrations with separate UP/DOWN strategies and rollback planning.
  • Zero-downtime deployment patterns (expand-contract, concurrent indexes, backfills) across multiple databases.
  • Guidance for data migrations, testing against production-sized data, and tooling recommendations for popular ecosystems like Prisma, Drizzle, Django, and TypeORM.

Quick Start

Review your current migrations and implement an expand-contract plan to introduce new changes safely.

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 without service interruptions?

Zero-downtime database migrations use the expand-contract pattern to separate schema changes from data backfills. This approach applies concurrent indexes and forward-only migrations to deploy updates safely across PostgreSQL and MySQL without locking tables.

Can I use this database migration guidance with Prisma, Drizzle, and TypeORM?

Yes, this database migration guidance supports common ORMs including Prisma, Drizzle, TypeORM, Django, and golang-migrate. It provides tooling recommendations and best practices for safe schema changes and rollback planning across these specific ecosystems.

What is the expand-contract pattern for schema changes?

The expand-contract pattern for schema changes splits migrations into separate expand and contract phases. You first apply forward-only schema additions and backfill data, then safely remove deprecated columns in a later deployment step to ensure continuous availability.

How do I create a safe rollback plan for data migrations?

A safe rollback plan for data migrations requires separate UP and DOWN strategies for every schema change. You must document specific rollback procedures and test them against production-scale data before executing any forward-only migrations.

Why should I separate schema changes from data migrations?

Separating schema changes from data migrations prevents table locking and reduces deployment risk. Applying schema modifications independently from data backfills ensures zero-downtime deployments and allows independent rollback if issues occur.

What are the limitations of forward-only database migrations?

Forward-only database migrations limit your ability to automatically revert destructive schema changes. Because this approach prioritizes zero-downtime safety, you must manually plan and document separate DOWN strategies and rollback procedures before deployment.