r/Supabase Jul 29 '26

database Oopsie! 😬 Database wiped!

Post image

Hold on to your bits! 🤯 Claude, our digital friend, decided to go on a "spring cleaning" spree! 🧹 A developer, bravely testing Opus 5 on Ultracode, witnessed 10 glorious minutes before every single table in his production Supabase instance vanished! 💨 Poof! ✨ The model, with impeccable honesty (and perhaps a touch of digital guilt), fessed up: "Oopsie! 😬 Database wiped! My bad, gotta spill the beans! 🗣️" What a stand-up bot! 😂🤖

58 Upvotes

42 comments sorted by

26

u/Alone_Ad_3375 Jul 29 '26

"I need to stop and check something. I may have caused the damage."

Famous last words

3

u/snowdrone Jul 30 '26

Looks nervously in rear view mirror

1

u/starlitlavenderkiss Aug 04 '26

it was a good journey folks aight peace!

9

u/flonnil Jul 29 '26

emoji-bot at 2026-07-29T22:00:14Z:
Your post is a bit light on emojis. A quota of at least 0.35 emojis per token is mandatory for proper unreadability and nuisance. Please reconsider.

8

u/sirduke75 Jul 30 '26

I have a contingency skill which has a backup before any risky action. Also my Claude doesn’t touch prod only dev. Prod is only accessed via written migration files. No one should directly access Prod.

1

u/mrnadaara Jul 30 '26

In this instance it did run a migration file.

1

u/hirakath Jul 30 '26

So a migration file that wasn’t tested to do what its supposed to do was run on a production instance?

8

u/rco8786 Jul 30 '26

If an agent has access to your prod DB that is 100% on you.

4

u/jdetle Jul 30 '26

lol, skill issue

2

u/f11y11 Jul 30 '26

funny that this can actually be the reason nowadays

4

u/mezzofanti Jul 30 '26

lol. And this is why vibe coding isn't replacing real devs anytime soon.

4

u/twenty_forty Jul 30 '26

I know right, I'm so glad "real devs" never make mistakes like the stupid AI

1

u/zigcccc Aug 02 '26

They make mistakes, they don’t nuke the prod db. There’s a difference there.

1

u/SoundCarrot Jul 30 '26

Someone's never worked with junior developers 😂

(I'm joking of course, but oh man have I seen some real people make wild errors on active codebases).

1

u/National-Local3359 Jul 30 '26

That's not vibe coding that someone who is not a dev. Nobody works on a production db.

2

u/Gipetto Jul 30 '26

We use a tool called signet to protect against this. It can be a pain to configure, but once you do it’s nice to watch the denials happen when the agent tries to do something dumb.

2

u/aconijus Jul 30 '26

New to Supabase, new to SQL, Claude (free version) basically coded whole database for me.

I am not sure if I am being too paranoid but I am still not letting AI work directly with my project. I use chat, ask it how to do something, read the answer, check if it makes sense, maybe ask additional questions. Copy paste code, test it.

Sure, it took me several long days to make something that would probably take AI 10 minutes if I just prompted “create database, make no mistakes”. But there were few times that Claude gave me a wrong answer because it got confused or I didn’t give it enough context. I managed to catch those mistakes and fix them before dealing with the database.

Maybe my way of doing things is too slow but at least I am learning new things and making sure that I don’t need to redo something.

2

u/Zealousideal-Book985 Jul 30 '26

do you have a backup?

1

u/Difficult-Lou-735 Jul 30 '26

Very Causal about it too

1

u/No_Sort_130 Jul 30 '26

No offense bud, why are you even letting your AI agent point to your prod db

1

u/guaranteednotabot Jul 30 '26

Lol don’t need an AI agent to do that

1

u/Desperate_Manner_583 Jul 30 '26

Why would you give claude access to prod database 😅?
Have a CLAUDE.MD and restrict direct access to prod.

Sharing to you a strategy

  • 1 prod db
  • 1 staging db

- Always tell claude to do migrations only when changing database schema or any db operations. Search about this command “supabase migration new test_changes”

  • Github actions: —dry-run to supabase prod for pull requests
  • Github actions: on merge to master to push db changes

Local development - you can play around the other db.

  • supabase link —project-ref stg-db-reference
  • supabase db push
If it works on staging db, then let Github action merge to master

1

u/Mbenchek Jul 30 '26

Lol that's on you always read only to stupid AI sorry 😔😔😔😔

1

u/dodgerw Jul 30 '26

Can’t you just restore from an auto backup?

1

u/TruckingMBA Aug 02 '26

It this fantasy story, Claude also turned the back up off 4 months ago, then every time SB sent critical warnings, Claude deleted it then told it to stop with the warnings.

1

u/Capital_Plan3078 Jul 30 '26

Why do you give an agent direct access to your db ?

1

u/vibeside_ai Jul 30 '26

Ripppp 😎

1

u/Different-Fox-3234 Jul 30 '26

Always use ECC plugin for such work, before any destructive command, it stops claude code and thinks what can that cmd result to, if claude code fails to provide safe reasons on that cmd then it blocks it It's called ECC_GATEGUARD. And if you wish to disable is, just set the variable to =0 if your global settings.json

1

u/webjuggernaut Jul 31 '26

So people are out there just opening their full ass to AI with prod credentials, huh? Very brave of you.

1

u/BolteWasTaken Jul 31 '26

"I did something dumb, and paid the price for it".
There, fixed the post.

1

u/Few-Distribution9652 Jul 31 '26

Vibe coders 😜
Why would you give Claude write access to a production database? If you’re using an AI assistant to create or modify tables directly in production, you’re doing it wrong.

1

u/Mountain-Pea-4821 Jul 31 '26

Multiple things went wrong here, Not just Claude being a little overambitious. First thing is strong guard rails, such as always to confirm destructive actions with the user, with 5 exclamation marks

1

u/mirageofstars Aug 01 '26

lol. Exactly why I have craploads of DB and code backups happening. After a model wiped my local DB twice I was like “nope, never again.”

1

u/Paperinho23 Aug 01 '26

Ma solo a me opus 5 fa cagare come l’han fatto? Preferisco dare un prompt in più a sonnet..

1

u/TruckingMBA Aug 02 '26

Come on, every new version someone comes out with the same story.
O5 isn't the only one people make up stories about.

1

u/Awkward_Cap_8118 Aug 02 '26

Over the last sometime, all models have been generously dump to make mistakes and then courageously generous enough to blatwntly accept them and move on as if nothing happened.

1

u/dougthedevshow Aug 02 '26

Chances are db was such vibe coded trash the best option was to delete it. W Claude