Audit advanced Works with: Any AI

SQL Migration and Bulk Update Script Safety Review

Checklist

Check an UPDATE, DELETE or migration script for missing WHERE clauses, lock risk, rollback gaps and a safe dry-run and verification plan.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

[VERIFY] is an editorial flag, not a blank to fill. Wherever the prompt shows [VERIFY], check that item against a reliable source before you use it.

Rate this prompt

Loading ratingsโ€ฆ

I am about to run a SQL script that changes data. Treat it as a pre-flight review. Database and version: [DATABASE_AND_VERSION]. Script: [SCRIPT]. Tables affected and their approximate size: [TABLES_AND_SIZES]. Environment: [ENVIRONMENT]. Allowed maintenance window: [MAINTENANCE_WINDOW]. Backup situation: [BACKUP_STATUS].

Provide: 1) A statement-by-statement table with the columns Statement, What it changes, Rows expected (from my notes), Danger (missing WHERE, join that can multiply updates, cascading deletes, long locks, irreversible type change), and Safety measure. 2) A pre-run checklist: backup restored or verified, dry run as a SELECT, row count check, transaction with explicit commit, test on a copy, who approves. 3) A rewrite of the riskiest statement as a read-only SELECT that returns the rows that would change. 4) Verification queries to run afterwards and the numbers I should expect. 5) A rollback plan, including what is not reversible.

Rules: do not execute or assume success. If the expected row counts are unknown, make that the first thing I must find out. Locking and transaction behaviour is database-specific, so mark claims [VERIFY] for [DATABASE_AND_VERSION]. This is a review aid; a named database owner must approve production changes. Do not suggest skipping the backup, even if the change looks small.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

Related prompts