2

    migration-safety-pro

    by Zicheng Liao

    Production-safe database migrations with zero-downtime strategies, batch backfilling, and multi-ORM support.

    Updated May 2026
    Instant install
    One-time purchase

    $12

    One-time purchase · Own forever

    ⚡ Also available via Agensi MCP — your AI agent can load this skill on demand via MCP. Learn more →

    Included in download

    • Generate zero-downtime migration scripts for tables with millions of rows
    • Implement the Expand-Contract pattern for breaking schema changes
    • terminal, env_vars automation included
    • Includes example output and usage patterns
    • Instant install

    See it in action

    Strategy: Expand-Contract (Zero-Downtime)
    1. Add 'email_lower' as nullable VARCHAR.
    2. Code Change: Dual-write to both 'email' and 'email_lower'.
    3. Batch Update:
       UPDATE users SET email_lower = LOWER(email) WHERE id IN (...)
       LIMIT 500;
    4. Finalize: Set NOT NULL and add UNIQUE INDEX CONCURRENTLY.

    About This Skill

    The Problem

    Database migrations are the highest-risk moments in a software lifecycle. A simple ALTER TABLE can lock production databases, cause significant downtime, or lead to irreversible data loss. Most developers rely on default ORM behaviors which are often unsafe for high-traffic environments or large datasets.

    What it Does

    Migration Safety Pro equips your AI agent with a production-grade blueprint for managing database schema changes across 9+ frameworks. It moves beyond simple SQL generation by implementing industry-standard safety protocols like the Expand-Contract pattern, Ghost Tables, and Batch Backfilling.

    Supported Frameworks & Tools

    • Node.js: Prisma, TypeORM, Sequelize, Knex.js
    • Python: Alembic (SQLAlchemy), Django Migrations
    • Ruby & Go: Rails Active Record, golang-migrate
    • Enterprise: Liquibase
    • Databases: PostgreSQL, MySQL, MariaDB, SQLite, SQL Server

    Why Use This Skill?

    Instead of just getting a generic migration script, your agent will proactively identify risks like table locks on tables with >1M rows, suggest non-blocking index creation (e.g., CONCURRENTLY in Postgres), and provide mandatory rollback scripts. It ensures every change is backward-compatible, enabling true zero-downtime deployments.

    Output Style

    Expect structured migration plans including: a safety risk assessment, a multi-step execution strategy (Expand phase vs. Contract phase), framework-specific safe code snippets, and a concrete rollback procedure.

    📖 Learn more: Best DevOps & Deployment Skills for Claude Code →

    Use Cases

    • Generate zero-downtime migration scripts for tables with millions of rows
    • Automate safety checklists and rollback procedures for CI/CD pipelines
    • Implement the Expand-Contract pattern for breaking schema changes
    • Convert risky ORM migrations into safe, batched SQL operations

    Reviews

    No reviews yet — be the first to share your experience.

    Only users who have downloaded or purchased this skill can leave a review.

    Security Scanned

    Passed automated security review

    Permissions

    Terminal / Shell
    Environment Variables

    Allowed Hosts

    www.liquibase.org
    www.w3.org

    File Scopes

    migration-safety-pro/**

    Frequently Asked Questions

    Similar Skills

    $12

    One-time