Schema Migration Pro

    by mochalatte

    1

    Automated SQL migration auditor for zero-downtime schema changes and data integrity.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLI+17 more

    See it in action

    You say

    Review this for a 5M row Postgres table: ALTER TABLE orders ADD COLUMN internal_code VARCHAR NOT NULL; CREATE INDEX idx_orders_code ON orders (internal_code);

    Your agent does

    Audit

    • Total issues: 3
    • Severity: 2 Critical, 1 Medium
    • Verdict: FAIL

    Critical

    1. NOT NULL without DEFAULT (Rule 1): Fails on 5M rows containing NULL. Add nullable first, backfill, then set NOT NULL.
    2. Non-concurrent index (Zero-Downtime Rule 2): Blocks writes. Use CREATE INDEX CONCURRENTLY.

    What you get

    Prevent production downtime by identifying blocking table locks.Ensure migrations are idempotent and safe for automated deployment pipelines.Identify missing indexes and foreign key performance bottlenecks.Generate structured audit reports for schema change PR reviews.

    About this skill

    The problem

    Database migrations often fail in production due to lock contention, missing idempotency, or data loss risks. Manual reviews are prone to overlooking how a 2M-row table reacts to a NOT NULL constraint or a non-concurrent index build.

    What it does

    • Audits SQL migration files for PostgreSQL, MySQL, and SQLite using a structured 28-rule framework.
    • Identifies zero-downtime risks like table-rewriting ALTER statements and blocking index builds.
    • Detects idempotency gaps and missing transaction wrappers that cause partial migration failures.
    • Evaluates rollback plans and seed scripts for data integrity and execution order.
    • Provides a structured report with severity levels, risk analysis, and concrete SQL fixes.

    Frameworks & tools

    PostgreSQL, MySQL, SQLite, Percona Toolkit (pt-online-schema-change), and gh-ost.

    Why this beats prompting it yourself

    General-purpose LLMs often miss database-specific edge cases like MySQL's lack of transactional DDL or PostgreSQL's NOT VALID constraint patterns. This skill applies a rigid, multi-stage audit specifically designed to catch production-breaking schema changes that simple prompts overlook.

    Use cases

    • Reviewing production schema changes for high-traffic tables to prevent downtime.
    • Validating seed scripts to ensure they are idempotent and deterministic for CI/CD.
    • Drafting safe rollback strategies for complex multi-step migrations.
    • Training junior developers on database performance and migration best practices.

    Known limitations

    Review-only tool. Does not connect to live databases, execute SQL, or verify the current state of your schema. Analysis is based entirely on the SQL snippets you provide.

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    Listedtoday

    Frequently Asked Questions

    Popular in DevOps & Deployment