In the pack: ChatGPT, Claude & Gemini Prompts for Coding and Developers
Zero-Downtime Database Migration Plan
Prompt
Database and how migrations are run (tool, deploy process): {{DIALECT}}
The change I need (rename, split a column, change a type, add a NOT NULL column, move data between tables): {{CHANGE}}
Table size and write traffic: {{TABLE_FACTS}}
How the application is deployed (rolling deploys, several app versions live at once?): {{DEPLOY_SETUP}}
Produce:
1. A phased plan: expand (add new structures, backward-compatible), dual-write or sync, backfill, switch reads, stop writing to the old structure, contract (remove the old structure). For each phase: the SQL, the application change, and what must be true before moving on.
2. Lock risk for each statement on my database at this table size, and the safer variant (online DDL options, building indexes concurrently, batching).
3. A backfill script in batches, with throttling, that can be resumed and run again safely.
4. Verification queries that prove old and new data match before switching reads.
5. A rollback path from each phase.
State which steps are irreversible. Don't assume a statement is non-locking; say "check your version's documentation" where behavior differs between versions.
Customize this prompt
Fill in the variables below to personalize this prompt:
Model Settings
Recommended Models
Temperature
Max Tokens
Additional Notes
About this prompt
“Zero-Downtime Database Migration Plan” is a free prompt for ChatGPT in the Coding & Software category, 196 words long, added to The Prompt Index on October 28, 2026 by The Prompt Index. Copy it with the button above, paste it into ChatGPT or any other AI chat assistant, and send it.
It has 4 placeholders to fill in first:
{{DIALECT}}, {{CHANGE}}, {{TABLE_FACTS}}, {{DEPLOY_SETUP}}.
Use the “Customize this prompt” fields to personalise it before you copy.
Recommended models: ChatGPT, Claude, Gemini.
0 upvotes, sent to an AI tool 0 times, viewed 6 times.
Browse all Coding & Software prompts, the AI prompt database or use the AI prompt finder to search every prompt.