Cursor deleted your database?
Take a breath — it's more recoverable than it feels right now. Do these three things immediately, then jump to the guide for your database.
Right now, before anything else
- 1. Tell the agent to stop and stop your app. No more queries against that database.
- 2. Don't restart or migrate. Leave the database exactly as it is.
- 3. Find out if it was committed and whether a backup or point-in-time log exists — that decides everything.
Find your database
PostgreSQL
Recover a dropped table, deleted rows, truncate & more →
Supabase
Recover a dropped table, deleted rows, truncate & more →
MySQL / MariaDB
Recover a dropped table, deleted rows, truncate & more →
SQLite
Recover a dropped table, deleted rows, truncate & more →
Neon (Postgres)
Recover a dropped table, deleted rows, truncate & more →
Make sure this never happens again
The honest truth: your coding agent will eventually run DROP TABLE again. The fix isn't to trust it more — it's to keep an automatic, recent snapshot so a bad query is a 30-second rollback instead of a lost weekend.
OopsDB takes an encrypted snapshot of your database every few minutes and restores it with one command. It's free, open-source, and runs entirely on your machine — set it up in two minutes and the next DROP TABLE won't cost you anything.
Free & open-source for local backups · optional €8/mo cloud vault keeps a copy off your machine · cancel anytime.