database-migrations

Guide database schema evolution across Alembic, Prisma, Django, and Go.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

## What problem does it solve? Large-scale database migrations are complex, risky, and error-prone without a robust plan and guided patterns.

## Core Features & Use Cases

  • Schema migrations: Support Alembic, Prisma, Django migrations with clear upgrade/downgrade steps.
  • Data migrations: Safe backfills and data transformation workflows with rollback support.
  • Zero-downtime strategies: Expand-contract and chunked backfills to minimize production impact.
  • Use Case: A team migrating a users table from email to email_address with minimal downtime and a safe rollback.

### Quick Start Run a migration review, generate an Alembic or Prisma migration scaffold, and verify rollback safety against production-like data.

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 for a large production table?

Zero-downtime database migrations use expand-contract patterns and chunked backfills to minimize production impact. This approach separates schema changes from data transformations, enforcing explicit upgrade and downgrade paths to maintain availability during complex table alterations.

What is the safest way to rename a column in Django or Prisma without downtime?

Safely renaming a column in Django or Prisma requires an expand-contract migration strategy. You add the new column, backfill data in chunks, update application reads, and finally drop the old column, ensuring a safe rollback path exists at every step.

Does this migration approach support both Alembic and Go workflows?

Yes, this migration approach supports Alembic, Prisma, Django, and Go workflows. It codifies ORM-specific schema evolution patterns across common databases, providing robust rollback and zero-downtime strategies tailored to each framework's conventions.

How do I test database rollback safety before deploying schema changes?

Testing database rollback safety involves verifying downgrade paths against production-like data. You run a migration review, generate the scaffold, and simulate both upgrade and downgrade steps to ensure data integrity and minimal risk before deployment.

When should I separate schema migrations from data backfills?

You should separate schema migrations from data backfills when performing complex data transformations on large tables. This separation minimizes lock contention and production risk, allowing schema changes to deploy independently of chunked data updates.

Why do large-scale database migrations fail without structured patterns?

Large-scale database migrations fail without structured patterns because they lack robust rollback plans and concurrency considerations. Explicit upgrade and downgrade paths, combined with monitoring and backups, are required to manage the complexity and risk of production schema evolution.