c/backend › command
0votes

Database migration safety review

ChecklistHigh risk
submitted by CommandVault editors to c/backend

Catch locking, data loss and rollback problems before running a migration.

Checklist · 2 variables
Review this migration before it runs on a production database with {{table_size}} rows:

{{migration_sql}}

Check and report:
1. Statements that take long or exclusive locks (adding NOT NULL, changing types, non-concurrent indexes).
2. Anything that drops or rewrites data — and whether it's reversible.
3. Whether app code that is deployed today keeps working during and after the migration.
4. A safer multi-step version if needed (expand → backfill → contract).
5. The exact rollback steps.

Finish with GO / NO-GO and why.
0 commentsreport

Try it here

Fill in {{table_size}}, {{migration_sql}} above first for a better answer, or run it as is and the AI will assume sensible values.

or open in ChatGPT · Claude · Perplexity

How to use this prompt

  1. Fill in the 2 blanks above. The more specific you are, the better the answer.
  2. Copy it and paste it into ChatGPT, Claude, Gemini, Cursor or Codex, or use "Try it here" for a quick test.
  3. Read the answer critically: check anything it claims about your code or data before you rely on it.
  4. Careful: this one is marked high risk. Review what the AI suggests before you run it on real systems or data.
  • {{table_size}} Table size
  • {{migration_sql}} Migration sql

More from c/backend

See all of c/backend →
0 comments

Log in to join the discussion.