SQL Migration Script Safety Review (Defensive)
Check a database change script before it is run.
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.
Review this database migration script before it runs, as a review for the owner. Script: [MIGRATION_SCRIPT]. Database system and size of affected tables: [DATABASE_AND_SIZES]. Whether the change will run while the application is live: [LIVE_CHANGE]. Backup and rollback arrangements: [BACKUP_ROLLBACK]. Check for statements that lock large tables, drop or truncate data, update or delete without a WHERE clause or with a broad one, change column types in ways that lose data, add non-null columns without defaults, create indexes that block writes, missing transaction handling, no rollback script, and dependencies on application changes. Explain each risk in plain words and propose safer steps such as batches, adding nullable columns first, backfilling, then adding constraints. Be precise about which statements are risky and why, and say what additional information would change your assessment. Return a table with Statement, Risk, Fix and Test, a pre-run checklist (backup verified, restore tested, run in a copy first, approvals) and a rollback outline. Do not run anything. Mark syntax [VERIFY].
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.