database-migrations

Plan and execute database migrations across PostgreSQL, MySQL, Prisma, Drizzle, Django, TypeORM, and golang-migrate.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use when creating or altering database tables, adding/removing columns or indexes, running data migrations, or planning zero-downtime schema changes. Invoke for PostgreSQL, MySQL, Prisma, Drizzle, Django, TypeORM, or golang-migrate.

Core Features & Use Cases

Safe, reversible database schema changes for production systems. Several practical patterns are included, such as adding columns safely, non-blocking index creation, zero-downtime strategies, and data migrations across multiple ORMs and tools.

Quick Start

Use this skill to plan and execute migration changes safely with guidance for a typical scenario, such as adding a new nullable column with a backfill.

Frequently Asked Questions about database-migrations

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

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

Zero-downtime database migrations are achieved by separating schema and data changes, enforcing forward-only migrations, and applying safety patterns like adding nullable columns with backfill. This approach prevents locking issues during production deployments.

Does this migration approach work with Prisma and Django ORM workflows?

Yes, the migration patterns apply to PostgreSQL, MySQL, Prisma, Drizzle, Django, TypeORM, and golang-migrate workflows. It provides specific safety strategies for adding columns, changing indexes, and running data migrations across these tools.

What is the safest way to add a new column and backfill data without downtime?

The safest way to add a column and backfill data is a multi-step, forward-only strategy: add a nullable column, deploy application changes, backfill data gradually, and enforce constraints. This separates schema changes from data changes to avoid table locks.

How do I create non-blocking indexes during a schema change?

Non-blocking index creation is handled through specific safety patterns included in the migration workflow. These patterns ensure that index changes on production databases do not block ongoing read or write operations.

Why should database schema and data migrations be separated?

Schema and data migrations should be separated to maintain zero-downtime deployments and enable forward-only rollback safety. Mixing them can cause long table locks, whereas separating them allows incremental, non-blocking changes.

What risk checks are needed before applying production database migrations?

Before applying production database migrations, use a risk-checklist to evaluate potential locking, backfill duration, and deployment safety. This ensures schema changes follow forward-only, reversible patterns without disrupting traffic.