How do I completely delete Cloud Datastore from a project?
A

9

22

I want to create a Firestore in Native mode in an existing project. I don't have any data in Cloud Datastore, but it blocks me, saying

This project uses another database service Your current project is set up to use Cloud Datastore or Cloud Firestore in Datastore mode. You can access data for this project from the Cloud Datastore console.

when going through https://console.cloud.google.com/firestore/ and

Cannot enable Firestore for this project Currently Firestore cannot be enabled in projects already using Cloud Datastore or App Engine

when going through https://console.firebase.google.com/

I've tried it with writes to datastore enabled and disabled

I just want to completely purge the Cloud Datastore product from my project.

Awfully answered 12/8, 2018 at 15:18 Comment(0)
H
1

Used to also run into this issue. But as of Jan 10, 2024 it's possible to delete datastore databases (more specifically "firestore in datastore mode" databases) from the console or CLI.

Holcman answered 10/4 at 21:9 Comment(0)
S
15

Unfortunately, there is no way to purge the previous existence of a Cloud Datastore database to try either Cloud Firestore in native or Datastore mode. You'll have to use a new project to try Cloud Firestore in either native or Datastore mode.

Shanty answered 14/8, 2018 at 21:36 Comment(7)
Gosh. That is really ridiculous. I didn't know that App Engine has to use Firestore in Datastore mode, now I have to re-create my whole project to fix it. Good grief. +1 for AWS.Stuyvesant
@Stuyvesant From console.cloud.google.com you can change it to "Native" but only one time.Witless
Hi @Witless could you point me in the direction to change to native from the console? Thanks!Egwan
@jackbridger Just go to console.cloud.google.com, select your database, there on the top you should see a button saying you can switch to Native mode.Witless
@Witless Your answer should be considered the correct one.Bilberry
It's an appalling design, the likes of which I've not seen in the other two cloud platforms, with extremely costly ramifications to set everything up again in a new project. Try this #52434955 and good luck, I feel your pain.Helicopter
You can now revert to firestore native mode if your datastore is still emptyTogoland
B
8

You can switch using the below command

$ gcloud alpha firestore databases update --type=firestore-native
Beutner answered 13/9, 2022 at 10:14 Comment(0)
A
4

This is the response I got from Google Cloud Support today (February 16th, 2021):

Generally, we do recommend to create a new project and enable Firestore therein. Nonetheless I may submit a request to delete your existing database which may allow you to change the database to the desired mode. However, please keep in mind that I’m unable to guarantee it’s approval.

Avidity answered 16/2, 2021 at 13:38 Comment(1)
Did it get approved?Hydroxide
W
3

I just tried it on my end. I deleted all my entities (test project) and disabled my Datastore API, same issue as you when I visit the console.firebase.google.com page.

This is likely an issue that needs to be reported either through support (if you have a support package for Google Cloud Platform), or through our issue tracker.

Waadt answered 12/8, 2018 at 21:20 Comment(2)
By "disabled Datastore API" do you mean disabling writes or something else? I just made a new project since I didn't really have anything of value in the old one, but someone else might be inconvenienced more.Awfully
How can i disable database api?Tera
R
1

Still the same as of 10 June 2020.

enter image description here

Rowdy answered 10/6, 2020 at 14:32 Comment(0)
H
1

Used to also run into this issue. But as of Jan 10, 2024 it's possible to delete datastore databases (more specifically "firestore in datastore mode" databases) from the console or CLI.

Holcman answered 10/4 at 21:9 Comment(0)
V
0

If you have an empty Datastore database and you never executed a write to the database, you can upgrade to Firestore in Datastore mode or Native mode.

If you do not receive this option, then your database instance will be automatically upgraded at a future date.

If you upgrade from Datastore to Firestore in Datastore mode or from Datastore mode to Native mode, you cannot undo the operation.

See this page for additional details: https://cloud.google.com/datastore/docs/upgrade-to-firestore

Vasya answered 19/2, 2020 at 12:54 Comment(0)
A
0

If you just want to lock down use the following security rule it will not delete but lock down your firestore so no one can write to it. Its not the answer you are looking for but in the same spirit.

// Deny read/write access to all users under any conditions
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if false;
    }
  }
}
Amylaceous answered 15/2, 2021 at 22:42 Comment(0)
C
-6

Just visit https://console.cloud.google.com/....... by clicking on the button, if you have not added any data it will show option to switch to native

Clomb answered 22/4, 2020 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.