Plan a database migration without downtime
Prompt for a migration plan in reversible steps that keeps the application running and checks every step. Paste it into an AI tool of your choice, which then writes the plan.
- Topic
- Coding & agents
- Type
- Prompt
- Level
- Advanced
- Time
- about 10 min
Results depend on the tool, the model and what you enter.
Result preview
Example: written by our editors, not real AI output.
Goal: rename column "customer_name" to "display_name" without downtime. 1. Expand: add new column display_name (nullable). Way back: drop the column. 2. Code writes to both columns. Way back: deploy the old version. 3. Copy data in batches of 10,000 rows. Check: rows without a value = 0. 4. Code reads only display_name. 5. After a week without errors: remove the old column. Not reversible, take a backup first. Assumption: the table has a primary key for batching.
Fill in
What you type stays in this browser window. We store and send nothing.
- rename a column
- change a column from text to number
- split one table into two
- new required column with a default value
- add an index on a large table
- PostgreSQL
- MySQL
- MariaDB
- SQL Server
- SQLite
- a few thousand
- about one million
- ten million
- several hundred million
- unknown
Your prompt
You have edited the prompt. Changes in the fields above no longer overwrite it.
This is an instruction for an AI, not the result itself.
Where this prompt works
These AI tools are a good fit for this prompt:
How to use it
- Fill in the fields or tap a suggestion. Leave out names, addresses and other personal data.
- Copy the finished prompt into an AI tool of your choice.
- Try the plan on a copy with a realistic amount of data first and measure how long each step takes.
Why does this work?
The fixed order of expanding first and removing later keeps old and new code versions working. Asking for the way back at every step prevents one-way streets.
Tips
- Take a verified backup before every migration and test the restore. The plan does not replace the documentation for your database version.