You can manage Cloud Firestore through the following actions in the Google Cloud Platform Console:
- Add, edit, and delete data.
- Manage indexes.
In Cloud Firestore, you store data in documents and organize your documents into collections. Before you start adding data, learn more about the Cloud Firestore data model.
To add, edit, and delete documents and collections from the GCP console, go to the Cloud Firestore Data page:
- Click Start Collection.
- Enter a collection ID. Enter a document ID. Cloud Firestore will generate document ID, but you can overwrite for a specific document ID. Add fields for the data in your document.
- Click Save. Your new collection and document appear in the data viewer.
- To add more documents to the collection, click Add Document.
- Click on a collection to view its documents, then click on a document to view its fields and subcollections.
- Click on a field to edit its value. To add fields or subcollections to the selected document, click Add Field or Start Collection.
To delete a collection:
- Select the collection you want to delete.
- Click the menu icon at the top of the documents column, then click Delete collection.
To delete a document or all of its fields:
- Select the document you want to delete.
- Click the menu icon at the top of the document details column. Select Delete document or Delete document fields.
Deleting a document deletes all of the nested data in that document, including any subcollections. However, deleting a document's fields does not delete its subcollections.
To delete a specific field in a document:
- Select the document to view its fields.
- Click the delete icon beside the field you want to delete.