firebase-to-supabase icon indicating copy to clipboard operation
firebase-to-supabase copied to clipboard

How to get firestore subcollections for migration?

Open gkhngyk opened this issue 2 years ago • 2 comments

I couldn't find in the Supabase Migrate Documentation how to pull subcollections inside a collection in Firestore.

For example, under a workspace collection, there is a sub-collection of users in that workspace. Supabase codes only get the /workspaces collection, not the users collection.

Eg : /workspaces/{workspaceId}/users

Can you help with an example? Thank you

gkhngyk avatar Feb 17 '23 14:02 gkhngyk

The only way I found is to read the workspace.json, take the id and iterate through them with /workspace//users

you have to create the /workspace/ folder for this to work.

simpros avatar May 15 '23 18:05 simpros

Yes, I'm create a folder's per collection Ejem: Collection name: setupGames/games/stage File System: setupGames/games/stage.json

BetoVega avatar Nov 17 '23 17:11 BetoVega