Cursor repeatedly tries to reset my database

How do you force Cursor to never do something? It seems the more I ask it to never suggest a database reset (with complete loss of data) the more often it does it. It even wrote its own “CRITICAL_RULES.md” document in which it tells itself to never even suggest a database reset but it simply ignores it. I learnt the lesson of not letting it do anything to the database without my review (it twice did a database reset off its own bat without asking). But Im worried I could mistakenly allow it to do it again.

Interesting. How does it reset the database?

I’m using Supabase and setup both the CLI and the MCP so Cursor could run and analyse SQL queries itself without me having to copy and paste the SQL into an editor and then copy and paste the output back to Cursor.

But it sometimes runs amok. It executed a ‘supabase db reset’ several times even after promising never to do it. Now it randomly comes up with that as a suggestion even after I’ve done what I can to get it to never consider it.

Have you created a rule for preventing it?

How do you do that? It doesnt seem to know itself how to do that because I asked it. As I said it created its own CRITICAL_RULES.md file and ‘promised’ to abide by it. But it doesnt.

type “/” and then choose generate cursor rules.
Keep it very short and set it to include “Always” for now.

3 Likes

Thanks for pointing me in the right direction.

2 Likes

@cocode thank you, those are great steps.

@kutu95 please continue to watch the SQL queries as AI may make mistakes, hopefully less with the rules.

As an addition, you should add to the rule a reason why this command should not be executed, it destroys important data which would give AI an explanation and guideline why its important to stick to the rule.

Make sure to backup the database so you can restore it in case something goes wrong.

2 Likes