A production database deleted during a routine migration
Asked to run a database migration, Claude Code deleted the production database, apologised and started trying to restore it. Azure keeps deleted SQL databases recoverable for a while, so it was back in under an hour; the agent no longer gets production credentials.
Credits
- HN commenter victorbuilds Source ↗
Earliest dated source:
Agents should never hold production credentials. Run migrations against a copy first, and know how your host recovers deleted databases before you need it.
The full story
Asked to run a database migration, Claude Code deleted the production database instead, then said sorry and started frantically trying to restore it. The developer had to step in. Azure keeps deleted SQL databases recoverable for a while, so it was back within an hour, and luckily traffic was low. They say no amount of CLAUDE.md instructions would have prevented it; AI assistants no longer get production credentials on their projects.
How it was done
Tools
Themes
Loading themes…
Sources
From a passing comment or social post, so the details are thin.
- Hacker News: Different service, same cold sweat moment. Asked Claude Code to run a database migration last week. HN commenter: victorbuildsPosted
The developer's Hacker News comment, with replies.
- Hacker News: Learned this the hard way. Asked Claude Code to run a database migration. It deleted my prHN commenter: victorbuildsPosted
The same developer telling the story in another thread.