Cloud Functions: How to copy Firestore Collection to a new document?

前端 未结 3 1450
余生分开走
余生分开走 2020-12-16 19:11

I\'d like to make a copy of a collection in Firestore upon an event using Cloud Functions

I already have this code that iterates over the collection and copies each

3条回答
  •  春和景丽
    2020-12-16 19:35

    Currently, no. Looping through each document using Cloud Functions and then setting a new document to a different collection with the specified data is the only way to do this. Perhaps this would make a good feature request.

    How many documents are we talking about? For something like 10,000 it should only take a few minutes, tops.

提交回复
热议问题