database-migrations

Plan safe database migrations for PostgreSQL, MySQL, and ORM frameworks.

1|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/Mark393295827/house-maint-ai --skill database-migrations-mark393295827
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/Mark393295827/house-maint-ai/tree/main/skills/database-migrations
Command: npx skills add https://github.com/Mark393295827/house-maint-ai --skill database-migrations-mark393295827

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database migrations across production systems require careful planning and safe execution to avoid downtime and data loss.

Core Features & Use Cases

  • Migration safety checklist and best practices for PostgreSQL, MySQL, and major ORMs (Prisma, Drizzle, Django, TypeORM, golang-migrate)
  • Zero-downtime strategies (expand-contract, batching, concurrent operations)
  • Structured patterns for adding/dropping columns, renaming with backward-compatible approaches, and data backfills
  • Real-world use cases: schema changes in production with minimal risk, rollouts across services and environments

Quick Start

Identify a production-safe migration plan and implement with separate schema and data migrations.

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 use the expand-contract strategy to separate schema and data changes into backward-compatible deployment phases. This approach batches concurrent operations to safely add, alter, or remove schema elements without blocking production traffic.

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

The expand-contract pattern for PostgreSQL schema changes splits migrations into expand phases that add new columns or tables, and contract phases that remove deprecated elements. This allows application code to deploy and adapt across services without breaking backward compatibility.

Does this migration guidance work with Prisma, Django, and TypeORM?

Yes, this guidance supports major ORM frameworks including Prisma, Drizzle, Django, TypeORM, and golang-migrate. It provides tooling guidance and structured patterns for adding, dropping, and renaming schema elements specific to these frameworks across PostgreSQL and MySQL.

What's the best way to handle data backfills during schema migrations?

The best way to handle data backfills during schema migrations is through batched operations deployed separately from schema changes. By structuring data migrations independently and applying a migration safety checklist, you backfill production data with minimal risk and zero downtime.

When should I use a migration safety checklist for MySQL schema changes?

A migration safety checklist for MySQL schema changes should be used for any production deployment involving column alterations, table renames, or data backfills. It enforces guardrails by verifying backward-compatible approaches, batching, and concurrent operation safety before execution.

Why do schema renames require backward-compatible approaches in production?

Schema renames require backward-compatible approaches in production to prevent service disruptions during rollout. By using expand-contract strategies to create new columns or tables before removing old ones, you ensure environments and services can migrate without downtime.