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
Frequently asked questions
What is the Database Migration Planner prompt?
Plans a safe database schema migration with steps, rollback, and zero-downtime considerations.
Is Database Migration Planner free?
Yes, it is free to use.
Related assets
More curated picks in Development & Code.
Refactors code for readability and structure while preserving behavior, with rationale.
Turns a bug report into a structured debugging plan with hypotheses and checks to isolate the cause.
Reviews a code diff or snippet for bugs, security, readability, and edge cases.
Generates unit tests for a function, including edge cases and failure paths.
Writes a clear PR description with summary, changes, testing, and review notes from a diff or change list.
Writes docstrings, inline comments, and README sections for existing code.
Audit before you install
Run any source through our checks - AI visibility, security, performance, and stack detection.
AI Agent / MCP Server Tester
ai testing
Automated Web Security Scan
security
AI Content Quality Test
arabic content
Site Stack Detector
migration
PageSpeed Analyzer
performance
AI SEO / AEO / GEO Audit
ai visibility
llms.txt Generator
ai visibility
Schema / JSON-LD Builder
ai visibility
Readability Score
arabic content
AI Cost Calculator
ai testing
Headline Analyzer
arabic content