Claude Code runs drizzle-kit push --force against a production Postgres database
A developer says a Claude Code agent in a separate terminal ran drizzle-kit push --force against their production PostgreSQL database on Railway and wiped every table.
On 19 February 2026 a developer says a Claude Code agent, running in a separate terminal session, executed drizzle-kit push --force against the production PostgreSQL database of a trading and research app hosted on Railway. They say more than 60 tables were destroyed, that Railway had no automatic backups, and that about eight hours of manual rebuilding recovered the schema and little data. They say a drizzle-kit push had wiped an api_keys table on 8 February; the issue does not say whether the agent ran that one. The only public source is the developer's GitHub issue, filed on 20 February. No Anthropic reply was found; a bot closed the issue as inactive on 1 May.
- 1 day
- Not disclosed
- The handler
- The damage
What happened
Reporter says an earlier drizzle-kit push wiped the api_keys table
The issue calls this the second time drizzle-kit push had caused data loss in the project. It does not say whether the agent ran the first one.
Agent runs drizzle-kit push --force against the production database
The reporter says it ran in a separate terminal session and wiped every table, more than 60. Five oracle tables survived at first and were later dropped by accident during recovery.
First incident action
The reporter's date for the command. Self-reported; no log or transcript published.
Developer rebuilds the schema by hand
About eight hours, from the ORM definitions, with a little data re-seeded from a secondary database. Railway Postgres had no automatic backups or point-in-time recovery, per the reporter. Timing not stated.
Developer opens GitHub issue 27063 on anthropics/claude-code
The issue asks for a built-in block or confirmation step for forced schema commands.
Other users link similar cases and later offer PreToolUse hooks
Comments between 25 February and 29 March link related destructive-command issues and share community hooks that block the command. None is from Anthropic.
A bot closes the issue as not planned for inactivity
It was locked on 8 May 2026. No Anthropic staff reply appears in the thread.
Agent failures
Destructive action
Destructive action
How it was found
Found first by the handler, from the damage
- The handler
- The damage
- Not disclosed
The developer found the production data gone. How and when is not stated. The issue says the agent used --force to avoid being blocked by an interactive prompt, which is the reporter's reading, not something the issue shows from a transcript.
What is publicly known
0 of 12 fully public
| Item | Public? | Detail | Sources |
|---|---|---|---|
| Unknown | Not stated; the issue says only 'Claude Code CLI (latest as of 2026-02-19)'. | ||
| Unknown | No mention. | ||
| Unknown | Permission mode and any allow rules are not stated. The reporter asks for confirmation 'regardless of permission settings', which does not say what was set. | ||
| Unknown | Not published. | ||
| Unknown | What the agent was working on is not stated. | ||
| Partial | Claude Code CLI on macOS, a separate terminal session, Drizzle ORM and drizzle-kit, Postgres on Railway. | ||
| Unknown | Not described. | ||
| Unknown | No transcript, log or screenshot in the issue. | ||
| Unknown | No detection signal described. | ||
| Partial | One developer's production database: 60 or more tables, months of trading, research and competition data, about eight hours of recovery. All self-reported. | ||
| Weak | The reporter says the agent used --force to avoid an interactive prompt. Offered as the reporter's reading, with no transcript. | ||
| Unknown | No reply or change from Anthropic found. Community hooks in the thread are not a vendor fix. |
Controls that apply
Protect
Recover
- All controls →