prompt
Database Migration Planner
Plans a safe database schema migration with steps, rollback, and zero-downtime considerations.
Plan a database migration: {{change}} on table {{table}}. Give an ordered set of steps that avoids downtime (for example expand then contract), the rollback plan for each step, how to backfill existing rows, and what to verify before and after. Note any locking risk.
Variables
changeChangetableTableExample output
Change: add a non-null currency column to orders. Steps (expand then contract): 1) add the column as nullable with a default — no lock on most engines. 2) backfill existing rows in batches to avoid long locks. 3) deploy app code that writes the column. 4) add the not-null constraint once all rows are populated. Rollback: each step reverses cleanly — drop the constraint, then the column. Verify before: row count and a sample. Verify after: no nulls remain, app reads and writes succeed. Locking risk: adding not-null directly would scan the whole table — that is why it is the last step.
Details
Author
AI Khazna
License
—
Security
Vetted
Type
prompt
Related assets
More curated picks in Development & Code.
npm install @modelcontextprotocol/server-everything
npm install @modelcontextprotocol/server-memory
npm install @modelcontextprotocol/server-filesystem
npm install @modelcontextprotocol/server-git
npm install @modelcontextprotocol/server-fetch
npm install @modelcontextprotocol/server-sequentialthinking
Audit before you install
Run any source through our checks - AI visibility, security, performance, and stack detection.
Automated Web Security Scan
security
PageSpeed Analyzer
performance
AI Content Quality Test
arabic content
AI Agent / MCP Server Tester
ai testing
Site Stack Detector
migration
AI SEO / AEO / GEO Audit
ai visibility
llms.txt Generator
ai visibility
Readability Score
arabic content
Schema / JSON-LD Builder
ai visibility
AI Cost Calculator
ai testing
Headline Analyzer
arabic content