I have two top-level databases, one for development and one for production. Within each database, I have child-databases for each customer.
A feature I’m working on requires me to create a new collection within each child-database. From what I gathered in the docs, my understanding is I need to write migration code that roughly follows these steps:
- Fetch a list of all child databases
- Create a new Fauna Client for each child database with the correct server key
- Create the collection
Is there a way I can do the above in the Shell using FQL? Related to that, what are best practices to deal with migrations in general?