database-migrations

Identify and apply zero-downtime database migrations across PostgreSQL, MySQL, and ORMs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manual and ad-hoc database migrations can cause downtime, data loss, and deployment drift. This Skill consolidates best practices to perform safe, reversible, and zero-downtime migrations across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Kysely, Django, TypeORM, golang-migrate).

Core Features & Use Cases

  • Safe migration patterns: schema changes separated from data migrations, with forward migrations and explicit down migrations.
  • Zero-downtime techniques: concurrent index creation, expand-contract strategy, and backfilling data in batches.
  • Tool-specific workflows: Prisma, Drizzle, Kysely, Django, Go-migrate have dedicated guidance for apply/deploy.

Quick Start

Review the migration plan and execute it using your preferred tool with safe settings.

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 PostgreSQL?

Zero-downtime database migrations in PostgreSQL use concurrent index creation and expand-contract patterns to apply schema changes without locking tables. This separates schema changes from data backfills to maintain backward compatibility.

What is the expand-contract pattern for database migrations?

The expand-contract pattern is a zero-downtime migration technique that separates schema changes from data migrations into backward-compatible phases. It allows adding or removing columns safely by expanding the schema first, then contracting it after deployment.

Does this database migration approach work with Prisma, Drizzle, and Django ORMs?

Yes, these database migration workflows support common ORMs including Prisma, Drizzle, Kysely, Django, TypeORM, and golang-migrate. Each tool has dedicated guidance for applying and deploying safe, reversible migrations.

How do I safely backfill data in MySQL without causing downtime?

Safe data backfills in MySQL require executing updates in batches to avoid locking tables and causing downtime. This approach enforces migration safety checks and separates data migrations from schema changes to prevent deployment drift.

What's the best way to add a column without locking the database?

Adding a column without locking the database requires non-blocking index creation and an expand-contract migration strategy. This ensures forward migrations remain backward-compatible and explicit down migrations are available for reversibility.

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

Separating schema changes from data migrations prevents deployment drift and avoids locking tables during backfills. This practice enforces migration safety checks, ensuring zero-downtime transitions across PostgreSQL and MySQL environments.