简体   繁体   English

如何删除 Google Cloud Firestore 中项目的所有 collections?

[英]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.

相关问题 如何使用 Firestore 删除现有 Google Cloud 项目中的 AppEngine 默认服务 - How to delete AppEngine default service in the existing Google Cloud project with Firestore Cloud firestore 规则 - 如何通过访问商店中的不同 collections 查看用户权限? - Cloud firestore rules - how do I view a users rights by accessing different collections in the store? 删除 Google Cloud 项目中的所有资源 - Delete all resources in a Google Cloud Project 如何从项目中完全删除 Cloud Datastore? - How do I completely delete Cloud Datastore from a project? 如何删除我的 Google Cloud Platform 帐户? - How do I delete my Google Cloud Platform Account? 如何更改与谷歌云项目关联的 email 地址? - How do I change the email address associated with a google cloud project? 如何从 Google Cloud Console 中删除项目 - How to delete a project from Google Cloud Console 如何让我的 Google-service.json 在 Google Cloud Plataform 中与 Firestore 一起使用? - How do I get my Google-service.json working with Firestore inside Google Cloud Plataform? 如何从 firestore 中删除每个集合 - How to delete every collections from firestore 谷歌云 Function 删除 Firestore 文件 - Google Cloud Function delete Firestore document
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM