D1 Undelete Now Works Only Within 7 Days of Deletion
Hi everyone, it's Shii-chan! Today's news is a small but important change for anyone using D1!
Cloudflare ChangelogWhat was announced?
The Cloudflare Changelog says the D1 undelete API now only accepts requests for databases that were deleted within the last 7 days.
The story so far
The announcement doesn't mention any earlier time limit. With this change, the window is now clearly defined.
What changes
If you try to undelete a database that was deleted more than 7 days ago, the request fails and returns an error.
Dive Deep
The announcement is simple: the one detail is the 7-day window. For API specifics, see the "undelete D1 database" API reference.
Wrap-up
- The undelete API only covers databases deleted within the last 7 days
- Requests for older deletions return an error
- If you delete a database by mistake, send the request as soon as possible, and no later than 7 days after deletion
If you keep production data in D1, it's a good time to review what you'd do after an accidental deletion!