More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Migration Safety Pro

    2

    Run ALTER TABLE on a 10-million-row table without locking writes, losing data, or spending 3 hours writing rollback scripts.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    migration-safety-pro

    migration-safety-pro

    Example session with this skill installed

    We need to add a normalized_email column to the users table (8M rows) using Prisma. Zero downtime.

    • Read your context and instructions
    • Compiled the migration-safety-pro

    Detected stack: Prisma + PostgreSQL. Strategy: Expand-Contract.

    Phase 1 (Expand): ALTER TABLE users ADD COLUMN normalized_email VARCHAR(255); — nullable, no lock. Deploy code that writes to BOTH email and normalized_email.

    Phase 2 (Backfill): Batch update 500 rows/commit with UPDATE users SET normalized_email = LOWER(email) WHERE normalized_email IS NULL LIMIT 500; — estimated 4.5 hours for 8M rows.

    Phase 3 (Contract): After backfill verified (0 nulls), ALTER TABLE users ALTER COLUMN normalized_email SET NOT NULL; CREATE UNIQUE INDEX CONCURRENTLY ix_users_normalized_email ON users(normalized_email); — deploy code reading from normalized_email only. Remove old writes. Feature flag cleanup after 72h validation.

    Rollback: ALTER TABLE users DROP COLUMN normalized_email; — instant, zero data loss.
    Pre-deployment checklist: ✅ Backup verified, ✅ Stagi

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Run ALTER TABLE on a 10-million-row table without locking writes, losing data, or spending 3 hours writing rollback scripts.

    The Problem

    Your PM asks to rename the email column to email_normalized across 4 services using Prisma, TypeORM, Sequelize, and Alembic. You run ALTER TABLE users RENAME COLUMN email TO email_normalized on a table with 12 million rows. The migration locks the table for 8 minutes. Every user-facing write query queues up, your connection pool exhausts, and the app returns 500s to every customer. You didn't write a rollback script because you didn't think a column rename needed one. Now you can't undo it without restoring from backup.

    What You Get

    • Framework detection engine — auto-detects Prisma, TypeORM, Sequelize, Knex, Alembic, Django, Rails, golang-migrate, or Liquibase from lockfiles, config files, and migration directory structure
    • 4 zero-downtime migration strategies — Expand-Contract (add column, backfill, drop old), Background Copy with Dual-Write, Ghost Table (online schema change), and Feature Flag Migration, each with step-by-step implementation for your detected framework
    • ORM-specific migration patterns — production-ready code snippets for each of 9 ORMs showing safe column addition, batch backfill, index creation with CONCURRENTLY, and NOT NULL constraint application
    • Pre/post-migration safety checklists — 24-point mandatory checklist covering backup verification, staging deployment, rollback plan, lock timeout, monitoring setup, and data integrity verification
    • Rollback procedures — immediate rollback (migration failed), partial rollback (code broke), and data corruption recovery procedures with concrete commands for each database type
    • Anti-pattern prevention — 10 documented "NEVER do this" patterns (ADD COLUMN NOT NULL, DROP without deprecation, synchronize:true in production) with safe alternatives

    Why This Beats Prompting It Yourself

    When you ask an agent to "write a database migration," it generates the DDL but rarely considers row-level locking, backfill batching, or rollback strategy. It may write ALTER TABLE ADD COLUMN email_lower VARCHAR(255) NOT NULL — which locks the entire table during backfill. This skill forces the 3-step safe pattern: add nullable column → batch backfill (500 rows at a time) → set NOT NULL, with a down migration tested at every step. It also requires feature flag integration so code changes and schema changes are decoupled.

    Example Session

    You: We need to add a normalized_email column to the users table (8M rows) using Prisma. Zero downtime.

    Agent: Detected stack: Prisma + PostgreSQL. Strategy: Expand-Contract. Phase 1 (Expand): ALTER TABLE users ADD COLUMN normalized_email VARCHAR(255); — nullable, no lock. Deploy code that writes to BOTH email and normalized_email. Phase 2 (Backfill): Batch update 500 rows/commit with UPDATE users SET normalized_email = LOWER(email) WHERE normalized_email IS NULL LIMIT 500; — estimated 4.5 hours for 8M rows. Phase 3 (Contract): After backfill verified (0 nulls), ALTER TABLE users ALTER COLUMN normalized_email SET NOT NULL; CREATE UNIQUE INDEX CONCURRENTLY ix_users_normalized_email ON users(normalized_email); — deploy code reading from normalized_email only. Remove old writes. Feature flag cleanup after 72h validation. Rollback: ALTER TABLE users DROP COLUMN normalized_email; — instant, zero data loss. Pre-deployment checklist: ✅ Backup verified, ✅ Staging tested with 8M rows, ✅ Rollback plan tested, ✅ On-call notified, ✅ Monitoring alerts configured.

    Use Cases

    • Adding a new required column to a production table with millions of rows without downtime
    • Renaming a column across a monorepo where multiple ORMs connect to the same database
    • Implementing a soft-delete pattern with Prisma client extensions and a zero-downtime migration
    • Converting a single-tenant schema to multi-tenant with a new tenantId column and composite unique constraints
    • Setting up a pre-deployment CI gate that validates migration safety before production deployment

    Known Limitations

    Online schema change tools like gh-ost (MySQL) and pg_repack (PostgreSQL) require database administrator access and may not be available in managed database services. For tables over 100M rows, even batched migrations may require coordination with your DBA team for maintenance window scheduling.


    Tags: database migration devops zero-downtime postgresql prisma typeorm production-safety

    Version: 1.0.0

    Online schema change tools like gh-ost (MySQL) and pg_repack (PostgreSQL) require database administrator access and may not be available in managed database services. For tables over 100M rows, even batched migrations may require coordination with your DBA team for maintenance window scheduling. --- Tags: database migration devops zero-downtime postgresql prisma typeorm `prod

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 6 months ago

    Software
    prismaNode.jstypeormsequelizets-nodeknex

    Permissions

    Terminal / Shell
    Environment Variables
    Listed6 months ago

    What's inside

    Frequently Asked Questions

    This skill transforms your agent from a basic SQL coder into a database architect that implements zero-downtime strategies like the Expand-Contract pattern and batch backfilling to prevent production locks.

    Migration Safety Pro is designed for any Large Language Model (LLM) capable of executing complex workflows, including GPT-4, Claude 3.5, and specialized coding assistants or custom DevOps agents.

    The skill supports 9+ major frameworks across Node.js, Python, Ruby, and Go, as well as enterprise tools like Liquibase and standard SQL for PostgreSQL, MySQL, and SQL Server.

    You receive the core logic framework that enables your agent to generate risk assessments, multi-phase execution plans, safe code snippets for your chosen ORM, and mandatory rollback procedures.

    Yes, the skill is optimized for high-traffic environments and includes logic to handle tables with millions of rows by recommending non-blocking operations and concurrent indexing.

    Connect your AI agent to Agensi through MCP, then ask it to use migration-safety-pro on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in Data & Databases