Neon
Releases
Security & compliance
Stability
DELETE FROM without WHERE in migration
Part of the Branching & migrations check · fix arrives as a guide
What it is
A migration contains a DELETE FROM with no WHERE clause.
Why it matters
It empties the table. If this reaches production it is total data loss for that table with no error and no confirmation prompt — the migration reports success.
How to fix it
Add the WHERE clause the statement was missing. If clearing the table is genuinely intended, use TRUNCATE so the intent is unmistakable to the next reader, and confirm it is not running against production.
Run them all on your app
Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.