- Home
- Skills
- Data & Databases
- CADENCE Safe Database Migration Author (Expand/Contract)
Works with the AI Agents you already use
CADENCE Safe Database Migration Author (Expand/Contract)
Zero-downtime expand/contract database migration author and auditor for EF Core, Alembic, Prisma, Drizzle, Room, and raw SQL with DDL/DML separation, idempotency guards, and rollback proof.
$9
CADENCE Safe Database Migration Author (Expand/Contract)
Example session with this skill installed
Create an expand migration to rename orders.status_code to orders.fulfillment_status and backfill existing rows in Postgres.
- Read your context and instructions
- Compiled the cadence safe database
Expand Migration Plan: FEAT-210 (Postgres / Alembic)
- Mode: expand (rename stripped and deferred to DEC-004 for later contract release)
- Files Created:
- alembic/versions/20261122_FEAT210_expand_add_fulfillment_status.py (DDL only: nullable column + CONCURRENTLY index + full downgrade)
- alembic/versions/20261122_FEAT210_data_backfill_fulfillment_status.py (DML only: 5,000-row batched backfill + guarded downgrade)
- Round-Trip Verification: upgrade -> downgrade -> upgrade exited 0 against local test DB
- Deferred Contraction: Appended DEC-004 (drop legacy status_code after 1 week zero-read telemetry)
Connects securely to your tools. The creator never sees your data.
About this skill
A single bad database migration can lock a production table, break rolling deployments, or make rollback impossible. Standard prompts routinely mix DDL and DML in one file, emit empty Down() methods, or drop columns while older app instances are still reading them.
What it does
CADENCE Safe Database Migration Author enforces zero-downtime expand/contract migration engineering across every major ORM and SQL migration runner:
- Automatic Stack & Dialect Discovery: Inspects your repo to detect
.NET / EF Core,Python / Alembic,TypeScript / Prisma or Drizzle,Kotlin / Room, or raw SQL (Flyway/Liquibase/migrations/*.sql) and matches your existing conventions and database dialect. - Strictly Additive
expandMode (Default): Allows only backwards-compatible changes (new tables, nullable columns, defaulted non-null columns, online/concurrent indexes, safe FKs/constraints). Automatically strips destructive ops (DROP,RENAME, un-defaultedNOT NULL, type narrowing) and logs them as a deferred contraction entry with a 4-item production readiness checklist. - Gated
contractMode: Refuses to generate destructive cleanup DDL until a human explicitly confirms production telemetry (zero reads/writes for>=1week, expand live for>=1sprint, backfill verified, no rollback planned). - Mandatory Hardening: Enforces complete non-empty
Up/Downreversibility, dialect-native idempotency guards (IF NOT EXISTS, PostgresDO $$, SQL ServerOBJECT_ID), strict DDL vs DML file separation,>1M-row lock-free safety, and empiricalApply -> Rollback -> Reapplyverification against a local/test database. - Read-Only
auditMode: Reviews existing or PR-staged migration files for safety violations before merge.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.
Never executes migrations against production databases. Round-trip Apply -> Rollback -> Reapply verification requires a local, test, or containerized database; if none is reachable, the skill outputs exact verification commands and flags unexecuted proof.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
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 3 days ago
- Software
Gitprisma
Node.jsdrizzle-kit
Requires your project's local ORM/migration CLI (e.g., EF Core, Alembic, Prisma, Drizzle, Flyway) and optional local test database for round-trip verification.
Permissions
File Scopes
Reads schema/model files, scaffolds migration files using your project's local ORM CLI, and runs Apply -> Rollback -> Reapply verification only against local/test databases. Never touches production databases or makes external network calls.