Registry DB reset
Safely destroying and recreating the registry schema for testing.
What it does
A reset:
- Drops schema
registryCASCADE - Re-runs migrations
- Re-seeds default projects, sources, and an API key
It does not drop your whole database.
When to use it
- You are testing crawler code changes
- You want to return to a clean seed state
When NOT to use it
- Production (unless you intentionally want to wipe the registry)
How to do it
UI
- /app/admin → Danger zone → Reset registry DB schema
- Type
RESETto confirm
CLI
npm run db:reset
API
curl -s -X POST 'http://localhost:3000/api/admin/db/reset' \
-H 'content-type: application/json' \
-H 'x-admin-token: <TOKEN>' \
-d '{"seedData":true,"confirm":"RESET"}'
Recovering after accidental reset
If you didn’t mean to reset:
- Restore Postgres from backups (see DevOps docs)