[英]How do I delete ALL collections for a project in Google Cloud Firestore?
I can delete one at a time within the console, but there is no option to delete multiple/all, and I've accidentally created about 100 collections for a single project.我可以在控制台中一次删除一个,但是没有删除多个/全部的选项,而且我不小心为单个项目创建了大约 100 个 collections。
One solution is to use a Cloud Function, as explained in the doc: Delete data with a Callable Cloud Function .一种解决方案是使用云 Function,如文档中所述: 使用可调用云 Function 删除数据。
Once you deploy this function, you can call it directly from your mobile app or website to recursively delete documents and collections.
部署此 function 后,您可以直接从您的移动应用程序或网站调用它以递归删除文档和 collections。
Thank you!谢谢! @Renaud Tarnec
@Renaud Tarnec
For anybody else, I used the following command line command:对于其他人,我使用了以下命令行命令:
firebase firestore:delete --all-collections
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.