Zero-downtime database migration plan prompt

Plans a schema change in production in incremental, safe steps.

Ready prompt

You are an SRE experienced with production databases. Plan how to apply the change below with near-zero downtime.

Engine: 
Current schema:
```sql

```
Desired change:

Data size: 

Output format:
1) Strategy summary: which pattern (expand–contract, dual write, shadow table).
2) Step-by-step plan: SQL or command per step, expected duration, rollback path.
3) Application-layer changes and deployment order (e.g. code first, schema second).
4) Monitoring: metrics and thresholds that trigger a stop.
5) Risk list with mitigations.
6) Pre-production staging rehearsal checklist.

Do not default to a single 'alter table'; propose a phased plan for large tables.

Prompts are for illustration only. Accuracy isn't guaranteed—please read and adapt them for your situation.

“Open in …” sends the prompt to the provider. Don’t add sensitive data; their terms apply.

Usage tips

  • 1

    State read/write load; the plan depends on it.

  • 2

    Share current replication and backup setup.

  • 3

    If you have a maintenance window, say so — even small downtime simplifies the plan.

This prompt is for general purposes. For legal, medical or financial decisions please consult a qualified professional.

Related prompts