database-migrations

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

27|4|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/skateddu/claude-code-python-setup --skill database-migrations-skateddu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/skateddu/claude-code-python-setup/tree/main/.claude/skills/database-migrations
Command: npx skills add https://github.com/skateddu/claude-code-python-setup --skill database-migrations-skateddu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database migration best practices to safely apply schema changes and data migrations without production downtime.

Core Features & Use Cases

  • Safe, reversible migrations across major engines (PostgreSQL, MySQL, ORM integrations)
  • Migration safety patterns: expand-contract, data-only migrations, non-blocking indexes
  • Use Case: Plan and execute a zero-downtime rollout for a critical schema change

Quick Start

Identify your target schema changes and apply safe, incremental migrations following the expand-contract pattern.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I execute zero-downtime database migrations in production?▼

Zero-downtime database migrations apply schema changes incrementally using the expand-contract pattern, separating data and schema modifications to avoid locking tables during production deployments.

What is the expand-contract pattern for schema changes?▼

The expand-contract pattern expands the database schema first, migrates data without breaking old code, and later contracts by removing obsolete columns once the deployment completes safely.

How do I create reversible database migrations across PostgreSQL and MySQL?▼

Reversible migrations across PostgreSQL and MySQL require writing explicit rollback scripts for both schema changes and data migrations, ensuring you can restore the previous state if deployment fails.

Can I use non-blocking indexes for data migration safety?▼

Non-blocking indexes allow you to add database indexes concurrently without acquiring exclusive table locks, which is critical for maintaining data migration safety and application availability.

Do I need ORM integrations to apply safe data migrations?▼

ORM integrations are not strictly required to apply safe data migrations, but they can streamline generating and tracking schema change versions alongside your application codebase.