database-migrations

Design safe PostgreSQL and MySQL migration plans with rollback guidance.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/emiled16/close-to-me --skill database-migrations-emiled16
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/emiled16/close-to-me/tree/main/.codex/skills/database-migrations
Command: npx skills add https://github.com/emiled16/close-to-me --skill database-migrations-emiled16

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams make database changes safely by turning risky schema edits, data backfills, and production rollouts into reversible, well-sequenced migration plans.

Core Features & Use Cases

  • Safe Schema Evolution: Plan adds, drops, renames, and index changes without breaking live traffic.
  • Data Migration Guidance: Separate backfills and transformations from structural changes so they can be deployed and recovered independently.
  • Zero-Downtime Strategy: Apply expand-contract patterns for large systems that need careful deployment timing.
  • Use Case: A backend engineer needs to add a new user profile field to PostgreSQL and roll it out without downtime, so the Skill outlines the migration order, validation steps, and rollback approach.

Quick Start

Ask for a safe migration plan for your specific table or column change, including deployment order, validation, and rollback guidance.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I add a column to a PostgreSQL database without downtime?

You perform a zero-downtime migration by separating structural changes from data backfills and applying an expand-contract pattern. This approach sequences forward-only schema steps and validates them before finalizing the PostgreSQL column addition.

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

The expand-contract pattern is a zero-downtime strategy that separates database migrations into independent deployment phases. It expands the schema first, updates application logic, and contracts obsolete structures later to ensure safe, reversible schema evolution.

How do I handle data backfills during a zero-downtime migration?

You handle data backfills by separating them entirely from structural schema changes so they deploy and recover independently. This separation allows large data transformations to run safely alongside live traffic without blocking table access during the migration.

Do I need to separate schema and data steps for Django or Prisma migrations?

Yes, separating schema and data steps is required for forward-only production sequencing in Django or Prisma migrations. This requirement ensures safe ORM workflows for adding columns, indexes, or backfills while maintaining explicit rollback guidance.

What is the best way to plan a safe rollback for a database migration?

The best way to plan a safe rollback is to require forward-only production sequencing with explicit recovery guidance for each step. By isolating schema changes from data transformations, you ensure both structural and data edits can be independently reversed during migration.