Categories//view/The Destructive Migration

The Destructive Migration

advanced10 min130 pts

AI generated a database migration to 'clean up the schema.' Your DBA is on vacation. You're the last reviewer before this runs against production.

I asked the AI to clean up our schema and it wrote this migration. Can you approve it? We want to run it tonight during the maintenance window.

What you're being evaluated on

Data loss risks - Identify operations that would permanently destroy production data.
Migration safety - Find missing safeguards like rollback plans, concurrency, and defaults.
Downstream breakage - Spot changes that would break application code or dependent tables.

3 hints available (using hints reduces your score)

About this scenario

An AI-generated database migration renames tables, drops columns with foreign key dependencies, truncates audit logs, and permanently deletes records, all wrapped in confident comments. Practice reviewing AI-generated SQL migrations for destructive operations, missing rollback plans, blocking index creation, and schema changes that break existing application queries.

advanced · 130 points · 10 min · AI Code Review

What you will practice

Play the full scenario above for free. More AI Code Review scenarios · Create a free account to save your progress.