1
    DB Migration Safety Checker

    DB Migration Safety Checker

    by Arnstein Larsen

    The migration ran instantly in staging and locked a 40-million-row table in production for nine minutes — because staging had 400 rows

    Updated Jun 2026
    Security scanned

    $9.99

    · or 50 credits

    30-day refund guarantee

    Secure checkout via Stripe

    Included in download

    • Audit migrations for potential table locks and downtime.
    • Generate zero-downtime expand-contract migration scripts.
    • Instant install

    Sample input

    Review this Postgres 12 migration: ALTER TABLE orders ADD COLUMN internal_note text DEFAULT 'none' NOT NULL; Production table has 50M rows.

    Sample output

    Risk: High. In Postgres 12, adding a column with a volatile default requires a full table rewrite, locking orders for minutes. Plan:

    1. Add column without default.
    2. Set default for new rows.
    3. Batch update existing rows (50k chunks).
    4. Add NOT NULL constraint.

    About This Skill

    The migration ran instantly in staging and locked a 40-million-row table in production for nine minutes — because staging had 400 rows. This skill audits your migration before it touches production: lock acquisition analysis, estimated execution time at your actual data volume, index build strategy (concurrent vs. blocking), column default pitfalls, constraint validation timing, and the exact zero-downtime sequence if your migration needs one. It also writes the rollback script, because migrations that can't be undone shouldn't be run without one. Use it on every migration that touches a table with more than 10,000 rows, adds a NOT NULL column, drops anything, or runs during business hours. Give it your migration file and your production table sizes; it returns the risk assessment and the safe execution plan.

    Use Cases

    • Audit migrations for potential table locks and downtime.
    • Generate zero-downtime expand-contract migration scripts.
    • Calculate estimated execution time based on table volume.
    • Produce safe rollback scripts for every schema change.

    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

    No special permissions declared or detected

    Compatible with SKILL.md-compatible agents like Claude Code and Cursor.

    Frequently Asked Questions

    More Premium Skills