Updating a collection name in Cloud Firestore


Can we change the name of a collection in Cloud Firestore? I have created a collection with 200 documents. Now I want to change the name of the collection. In the Firebase console, I could not find a way to do this.

Is it possible to change a collection’s name either through code or in the console. Or Is it possible to export documents from Firestore, create a new collection and then import those documents again?

Please help.


It’s not possible to change the names or IDs or collections or documents once they exist. All that data is immutable, for the purpose of building efficient indexes.

You could certainly read everything out, then put it all back in with new names and IDs.

Answered By – Doug Stevenson

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published