database-migrations

Plan and implement zero-downtime database migrations with UP/DOWN scripts.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/KanakMalpani/General-Private-Skills --skill database-migrations-kanakmalpani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/KanakMalpani/General-Private-Skills/tree/main/skills/database-migrations
Command: npx skills add https://github.com/KanakMalpani/General-Private-Skills --skill database-migrations-kanakmalpani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database migrations are complex and risky in production; this Skill provides a vetted approach to handling schema changes, data migrations, and zero-downtime deployments.

Core Features & Use Cases

  • Safe, reversible migrations with clear UP/DOWN paths.
  • Separation of schema changes and data migrations to reduce risk.
  • Guidance for zero-downtime strategies across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Django, TypeORM, golang-migrate).
  • Use cases include rolling out new columns with backfills, adding indexes without locks, and handling large production datasets.

Quick Start

Review the migration plan and implement a zero-downtime rollout using safe patterns.

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 are achieved by separating schema changes from data migrations and implementing safeguards against table locks and data loss. This approach uses reversible UP/DOWN scripts to ensure safe deployments.

Can I use this migration workflow with Prisma, Django, or TypeORM?

Yes, this migration workflow supports PostgreSQL and MySQL alongside ORMs including Prisma, Drizzle, Django, TypeORM, and golang-migrate. It provides specific guidance for zero-downtime strategies across these frameworks.

What's the best way to add a new column and backfill data without downtime?

The best way to add columns with backfills is to separate the schema change from the data migration. This vetted approach reduces risk by applying distinct, reversible steps with safeguards against locks.

How do database rollback scripts work when a schema change fails?

Database rollback scripts work by providing a clear DOWN path for every UP migration applied. This reversible workflow allows you to safely undo schema changes and data migrations if a production deployment fails.

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

Separating schema changes from data migrations reduces production risk by breaking complex deployments into safe, manageable steps. This separation prevents long table locks and ensures the migration remains reversible.

How do I add database indexes without locking large production tables?

To add indexes without locks, you apply zero-downtime migration patterns designed for large production datasets. This workflow provides safeguards against locks to ensure continuous availability during schema changes.