Workers SDK Issue Reports

← Back to Dashboard

#8995 Unexpected D1 Database Deletion Behaviour in Wrangler CLI

Recommendation:CLOSE
Difficulty:n/a
Reasoning:

PR #11117 (merged 2025-10-30) explicitly fixes this issue. D1 commands now show local/remote status before confirmations. Released in wrangler 4.45.3.

Suggested Action:

Close with comment explaining fix is available

Analysis Report

Issue Review: cloudflare/workers-sdk#8995

Summary

User accidentally deleted production D1 database because wrangler d1 delete does not clearly indicate whether it's targeting local or remote resources.

Findings

  • Created: 2025-04-17
  • Updated: 2025-12-14
  • Version: 4.1.1 (reported) / 4.11.1 (in error logs) -> 4.60.0 (current)
  • Component: D1 (wrangler)
  • Labels: bug, quick win, error-messaging
  • Comments: 2 (other users experiencing same issue)

Key Evidence

  • PR #11117 explicitly fixes this issue (merged 2025-10-30)
  • Released in wrangler 4.45.3 (changelog entry: "fix: show local/remote status before D1 command confirmations")
  • Current version 4.60.0 includes this fix

Recommendation

Status: CLOSE

Reasoning: PR #11117 was merged on 2025-10-30 and explicitly fixes this exact issue. The fix was released in wrangler 4.45.3. D1 commands (including d1 delete) now display "Using local resources" or "Using remote resources" before any confirmation prompts, addressing the user's request for more verbose warnings.

Action: Close the issue with a comment explaining the fix.

Suggested Comment

This issue has been fixed in PR #11117, released in wrangler 4.45.3. D1 commands (including d1 delete) now display whether they're operating on local or remote resources before any confirmation prompts. Please update to the latest version of wrangler (currently 4.60.0) to get this improvement.

Thank you for reporting this and sorry for the inconvenience caused!

Notes & Feedback (0)

No notes yet.

Add Note