2

    db-migration-architect

    by Markus Isaksson

    Architect zero-downtime SQL migrations with automatic dialect detection and phased deployment plans.

    Updated May 2026
    Security scanned
    One-time purchase

    $12

    One-time purchase

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

    Included in download

    • Generate paired UP/DOWN migrations for complex schema changes.
    • Convert destructive one-step migrations into safe, multi-phase rollout plans.
    • file_read, file_write automation included
    • Includes example output and usage patterns
    • Instant install

    See it in action

    Severity: 🟡 Locking (Phased)
    Phase 1: Add 'email' as nullable.
    Phase 2: Backfill data.
    Phase 3: Set NOT NULL.
    
    -- UP (Phase 3)
    ALTER TABLE users ALTER COLUMN email SET DEFAULT 'not-set';
    ALTER TABLE users ALTER COLUMN email SET NOT NULL;
    
    -- DOWN
    ALTER TABLE users ALTER COLUMN email DROP NOT NULL;

    About This Skill

    What it does

    The DB Migration Architect is a specialized tool for developers who need to evolve their database schemas without causing outages or data loss. It analyzes your ORM model changes, schema diffs, or natural language descriptions to generate safe, rollback-ready migration scripts. It automatically detects your database dialect (PostgreSQL, MySQL, SQLite, SQL Server) and framework conventions (Alembic, Django, Prisma, Knex, etc.) to produce code that fits perfectly into your existing repository.

    Why use this skill

    Directly asking an LLM for a migration often results in "simple" SQL that can lock production tables for hours or break running application code. This skill enforces zero-downtime principles by default. It identifies hazardous operations—like adding a NOT NULL constraint to a large table or renaming a column—and automatically proposes a phased rollout (e.g., add nullable, backfill, then enforce constraint). It saves you from the "ALTER TABLE" trap that causes production incidents.

    Supported frameworks & tools

    • Python: Alembic, Django
    • JavaScript/TypeScript: Prisma, Knex, TypeORM
    • Others: Rails ActiveRecord, Flyway, Liquibase, and Raw SQL
    • Dialects: Deep support for PostgreSQL (concurrent indexes), MySQL (online DDL), and more.

    The Output

    You receive a structured migration plan including a severity rating (Safe, Locking, or Destructive), paired UP and DOWN scripts, and detailed deployment notes explaining how to coordinate the schema change with your application code deployments.

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

    Use Cases

    • Generate paired UP/DOWN migrations for complex schema changes.
    • Convert destructive one-step migrations into safe, multi-phase rollout plans.
    • Audit existing migrations for locking risks on high-traffic tables.
    • Detect and match migration styles for Alembic, Prisma, Django, and more.

    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

    Read Files
    Write Files

    Reads model definitions and existing migrations, writes new migration files in the project's framework convention. Does not connect to any database, does not run migrations, and refuses single-step destructive operations by default.

    Frequently Asked Questions

    Similar Skills

    $12

    One-time