Claude Code executed destructive `supabase db reset` without warning, destroying curated user data
Claude Code executed npx supabase db reset to apply a single new migration, when npx supabase migration up was the correct non-destructive command. This wiped the entire local Supabase database including:
- Manually curated product image selections (
is_card_imageflags) - Custom image ordering and deletions (a full day of manual work)
- Admin user and auth identities
- Store settings and configuration
The seed script only restores raw catalog data from cloud — all manual curation was irrecoverably lost.
What should have happened: Claude should have used migration up (incremental) instead of db reset (destructive). At minimum, it should have warned the user about data loss before executing.
Impact: ~1 day of manual work lost. User had to re-seed and lost all curated data that wasn't backed up.
Suggestion: Consider adding db reset, db drop, DROP DATABASE, TRUNCATE to the same category of dangerous commands that require explicit user confirmation, similar to git reset --hard and rm -rf.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗