![](/img/trans.png)
[英]How do I delete ALL collections for a project in Google Cloud Firestore?
[英]How do I completely delete Cloud Datastore from a project?
我想在現有項目中以本機模式創建 Firestore。 我在 Cloud Datastore 中沒有任何數據,但它阻止了我,說
此項目使用其他數據庫服務您當前的項目設置為在 Datastore 模式下使用 Cloud Datastore 或 Cloud Firestore。 您可以從 Cloud Datastore 控制台訪問此項目的數據。
當通過https://console.cloud.google.com/firestore/和
無法為此項目啟用 Firestore 目前無法在已使用 Cloud Datastore 或 App Engine 的項目中啟用 Firestore
當通過https://console.firebase.google.com/
我已經嘗試過啟用和禁用對數據存儲的寫入
我只想從我的項目中徹底清除Cloud Datastore
產品。
遺憾的是,無法清除 Cloud Datastore 數據庫的先前存在以嘗試在本機或 Datastore 模式下使用 Cloud Firestore。 您必須使用一個新項目才能在本機或 Datastore 模式下嘗試 Cloud Firestore。
這是我今天(2021 年 2 月 16 日)從 Google Cloud Support 得到的回復:
通常,我們建議創建一個新項目並在其中啟用 Firestore。 盡管如此,我可能會提交刪除您現有數據庫的請求,這可能允許您將數據庫更改為所需的模式。 但是,請記住,我無法保證它的批准。
如果您有一個空的 Datastore 數據庫並且從未對該數據庫執行過寫入操作,則可以在 Datastore 模式或本機模式下升級到 Firestore。
如果您沒有收到此選項,那么您的數據庫實例將在未來自動升級。
如果您在 Datastore 模式下從 Datastore 升級到 Firestore,或者從 Datastore 模式升級到 Native 模式,則無法撤消該操作。
有關其他詳細信息,請參閱此頁面: https : //cloud.google.com/datastore/docs/upgrade-to-firestore
如果您只是想鎖定,請使用以下安全規則,它不會刪除而是鎖定您的 Firestore,因此沒有人可以寫入它。 它不是您正在尋找的答案,而是本着同樣的精神。
// Deny read/write access to all users under any conditions
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if false;
}
}
}
您可以使用以下命令進行切換
$ gcloud alpha firestore databases update --type=firestore-native
只需訪問https://console.cloud.google.com/ ....... 點擊按鈕,如果您尚未添加任何數據,它將顯示切換到本機的選項
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.