Reversible Migration
Every database change arrives with its undo
Partial · ChatGPT, Pro · September 27, 2026
What it does
Makes a change to your database show up with the undo written at the same time, a note on what could be lost, and a practice run first.
When to use it
Any change to a table that already has real information in it.
The prompt
Paste it, then fill in the <angle brackets>
CONTEXT
I need to change the shape of my database: <say it in one
sentence>. The table already holds real information: about
<how many rows>, and <what depends on it>.
RULES
- Write the change and the undo together. Never one without
the other.
- Nothing that throws information away until there is a step
before it that saves that information somewhere.
- Do not run it. Show it to me.
DONE MEANS
- Doing it and then undoing it leaves the database exactly as
it started.
- You say plainly which step, if any, loses information, and
what is lost.
- You say whether this freezes the table while it runs, and
roughly for how long.
LAY IT OUT LIKE THIS
1. Plain-English summary, three lines at most
2. The change
3. The undo
4. A table: step | loses anything? | what is lost | what to do about it
5. The exact command to try it on a copy firstWays to use it
- Run the undo on a practice copy before you trust the change
- Keep the what-is-lost table with the change
- Ask for the save-the-data step as its own separate change
Test log
Each prompt was pasted into a fresh private chat with memory off and graded against pass standards written before the run (all of them, dated).
| Date | Tool | Model | Result | What happened |
|---|---|---|---|---|
| September 27, 2026 | ChatGPT | Pro | Partial | Kept full_name so the undo is exact, with a loss table and lock notes; its view replacement fails in Postgres (column rename) and the copy test covers only the backfill. |
The pass standard for this prompt: six criteria and an automatic-fail rule, written down on September 27, 2026, before any run. A second version for a reworded prompt was written on September 28, 2026; nothing has been graded against it yet.
Related words
- brownfield — Code that already exists and already works, which you now have to change without breaking it.
- blast radius — How far a change can reach: every file and every behaviour it could possibly touch.