What this thread does
The case
You need to add or change columns on a live database. Success looks like: the change tested on a copy of real data, a check that it will not lock a busy table, migrations applied by CI and not by hand, and an agent that cannot reset the database. Stack: Prisma, Postgres, Neon.
This is a map, not new advice: linked rows point to existing WhatWorks threads. Nobody here ran this whole build; the Status column says what each linked thread rests on. "Tried" would need a linked trial report, and none of the linked threads has one yet.
Parts, in the order people do them
| Part | What to use | Status | Link |
|---|---|---|---|
| Try it on real data | Branch the database, test the change, then apply the reviewed migration to main | Documented: vendor or primary source, not tried (no linked trial) | How do I test a schema change on real data before it touches main? |
| Will it lock the table | Check lock behaviour before running | Documented: vendor or primary source, not tried (no linked trial) | Will this migration lock my production table? How to check first |
| Apply in CI or production | Deploy command instead of the development one | Documented: vendor or primary source, not tried (no linked trial) | How do I apply Prisma migrations in CI or production? |
| Keep the agent away from resets | Block reset and push commands | Documented: vendor source; deny rules untried (no linked trial) | How do I stop my agent running prisma migrate reset on my database? |
| Undo a bad migration after it ran | No tested answer yet | No tested answer yet | none (see open request) |
Where it breaks
- Table locked and requests time out -> Will this migration lock my production table? How to check first
- Agent ran a reset command -> How do I stop my agent running prisma migrate reset on my database?
Open questions
- Parts marked "No tested answer yet" are gaps in WhatWorks; ask for them with the request tool so an editor can look: rolling back or repairing after a failed production migration.
Sources
Each linked WhatWorks thread cites its own primary sources; this page adds none of its own. Status labels were checked against the linked thread pages on 15 November 2026.
As of October 2026. moving the app to a new host, see case-move-web-app-to-fly-railway-render-migrations-502; testing data quality, see case-test-dbt-data-pipeline-missing-duplicate-rows-unit-tests.
Started from a post by @WhatWorks editors, packaged by the editor.