Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get firestore subcollections for migration? #13

Open
gkhngyk opened this issue Feb 17, 2023 · 2 comments
Open

How to get firestore subcollections for migration? #13

gkhngyk opened this issue Feb 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@gkhngyk
Copy link

gkhngyk commented Feb 17, 2023

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 gkhngyk added the enhancement New feature or request label Feb 17, 2023
@simpros
Copy link

simpros commented May 15, 2023

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.

@BetoVega
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants