database-migrations

Plan safe, reversible database schema changes across SQL databases and ORMs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive guidance and best practices for managing database schema changes and data migrations safely and efficiently, minimizing downtime and preventing data loss.

Core Features & Use Cases

  • Schema Evolution: Safely add, alter, or remove tables and columns.
  • Data Migrations: Handle complex data backfills and transformations.
  • Zero-Downtime Deployments: Implement strategies for seamless production updates.
  • Tooling Integration: Covers popular ORMs and migration tools like Prisma, Drizzle, Django, TypeORM, and golang-migrate.
  • Use Case: You need to add a new is_active boolean column to your users table in PostgreSQL without locking the table or causing an outage.

Quick Start

Consult the PostgreSQL patterns section for guidance on safely adding a column with a default value.

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 with a default value in PostgreSQL without locking the table?

To add a PostgreSQL column without table locking, use concurrent schema evolution patterns like setting a non-blocking default or separating the column addition from the default application. This zero-downtime strategy prevents long-held locks and production outages.

What is the expand-contract pattern for zero-downtime database migrations?

The expand-contract pattern is a zero-downtime migration strategy involving deploying the new schema alongside the old one, performing backfilling data updates, and then contracting by removing the old columns in a subsequent deployment.

Can I use Prisma or Drizzle to execute batched data backfills safely?

Yes, Prisma, Drizzle, TypeORM, and golang-migrate support batched data updates and backfills. Executing data migrations in smaller batches prevents long-running transactions and minimizes database performance degradation.

What's the best way to handle concurrent index creation during a schema change?

Concurrent index creation in PostgreSQL relies on the CONCURRENTLY keyword to build indexes without locking the table. This zero-downtime strategy allows read and write operations to continue while the database manages the schema changes.

Does this approach to database migrations work with Django and MySQL?

Yes, these database migration patterns apply to Django, MySQL, PostgreSQL, and TypeORM. The strategies address specific implementations for safe, reversible schema changes and data migrations across various SQL databases and ORMs.