Rename Collection / Change Collection ID
Rename Collection / Change Collection ID
The Firebase Console is missing some essential features like renaming collections. Previously you had to create a new collection with the same documents and delete the old collection manually or write a script that does this for you. With Firefoo, it's a matter of a few clicks!
- Download and install Firefoo.
- Right-click the collection in the sidebar and select Rename Collection.
- Enter the target collection name and click OK.
- That’s it!
Subcollections in the documents of the source collection will be copied recursively to the target collection. You don’t have to worry about them.
If you want to rename a subcollection, that is also possible with Firefoo! Subcollections are not shown in the sidebar. That’s why you have to locate the subcollection in the Tree view (not the Table view, which currently does not list subcollections) and open the right-click context menu from there.
For every document in your Firestore collection, the rename operation in Firefoo uses two reads, one write and one delete.
The two reads are due to the need to check every document for subcollections, which has to be performed as a separate request.