Hi all, So I am trying to see how I can use D1 in a multi-tenant fashion. Suppose I am developin
Hi all,
So I am trying to see how I can use D1 in a multi-tenant fashion.
Suppose I am developing an onboarding workflow, when a user signs up to my platform, I need to create a database for that user; as the user invites their team members to his group, they will share the same D1 database that was created when they signed up.
As far as I understand, there needs to be bindings between workers and D1 so the workers can access them, so how would this work in this multi-tenant scenario? I suppose I will need to store the database ID's of all the dynamically created D1's in another root level D1 database that keeps track of tenant information, at a minimum, but what about granting access to workers for these dynamically created D1s?
Are there any official guides on this?
Thanks!
So I am trying to see how I can use D1 in a multi-tenant fashion.
Suppose I am developing an onboarding workflow, when a user signs up to my platform, I need to create a database for that user; as the user invites their team members to his group, they will share the same D1 database that was created when they signed up.
As far as I understand, there needs to be bindings between workers and D1 so the workers can access them, so how would this work in this multi-tenant scenario? I suppose I will need to store the database ID's of all the dynamically created D1's in another root level D1 database that keeps track of tenant information, at a minimum, but what about granting access to workers for these dynamically created D1s?
Are there any official guides on this?
Thanks!

