revisit-studies / study

Create your own study by cloning and editing configs; or check out the code behind the study components.
https://revisit.dev/study/
BSD 3-Clause "New" or "Revised" License
9 stars 53 forks source link

Refactor FirebaseStorage `_{copy,delete}collection` methods to be recursive #391

Open JackWilb opened 3 months ago

JackWilb commented 3 months ago
          These `_{copy,delete}collection` methods are going to sting us when we add anything else to the firestore... I think we need to make these more general, but I don't want to slow this PR down. Let's make an issue for these for when we have some extra cycles

_Originally posted by @JackWilb in https://github.com/revisit-studies/study/pull/387#discussion_r1630637782_

bbollen23 commented 3 months ago

Additional Context: When we copy a collection or document, we need to recursively check subcollections and subdocuments to copy everything over at once. If we are just looking to copy specific elements (which is currently the case in the _copyCollection method), we don't need to handle recursive cases.

But, when we add more information to our firestore databse, we may want to copy everything and thus make it more general.