clear a dev deployment
2 quick questions:
1. Is there a way to wipe/reset a dev server? (other than snapshot --replace)
2. Is there some way to delete all files in storage for a dev server?
6 Replies
the supported way, for both tables and file storage, is to do
npx convex import --replace
with a zip file that has empty data for each table and _storage
. there's currently no other way, although we are considering building one.Alright so basically taking a snapshot like one i already have exported and "clearing it out", would do the trick. Is that correctly understood?
yep that's exactly it
Cool. I'll do that. Thanks for the quick response 🥷
Re 2) there's an API to list all files which you can then walk over and delete https://docs.convex.dev/file-storage/file-metadata
Accessing File Metadata | Convex Developer Hub
Every stored file is reflected as a document in the "_storage" system table.
Totally missed that. Thanks Tom!