Closed meherpanguluri closed 4 years ago
Hi @meherpanguluri ! Did you follow the Getting Started guide? It should explain how to make it work.
In a few words:
prisma-multi-tenant add
If after following the Guide you still have questions, don't hesitate to ask them here 🙂
Yes I have followed the getting started guide
I have used prisma-multi-tenant new
to create a new tenant.
I see tenant getting created on the management db but I dont see schema on tenant db.
Thanks
Was there an error in the console when creating the new tenant? If not, can you make a small reproduction repository so that I can replicate the issue?
There is no error when creating a tenant.
? Name of the tenant: tenant2 ? Database provider: postgresql ? Database url: postgresql://postgres:postgres@localhost:32769/postgres
{ name: 'tenant2', provider: 'postgresql', url: 'postgresql://postgres:postgres@localhost:32769/postgres' }
? Are you sure of your inputs? Yes
✅ Registered the new tenant into management and migrated up the database!
Can you try running prisma-multi-tenant new --verbose
to have more informations on what the command did?
prisma-multi-tenant new --verbose
Warning: Prisma does not yet allow for multi-provider clients, so you must use the same provider used in your schema.prisma file.
? Name of the tenant: tenant1 ? Database provider: postgresql ? Database url: postgresql://postgres:postgres@localhost:32769/postgres
{ name: 'tenant1', provider: 'postgresql', url: 'postgresql://postgres:postgres@localhost:32769/postgres' }
? Are you sure of your inputs? Yes $> "/Users/dev/Desktop/test-prisma/node_modules/@prisma/cli/build/index.js" migrate up --create-db --experimental (node:11894) ExperimentalWarning: The fs.promises API is experimental
✅ Registered the new tenant into management and migrated up the database!
I see that the tenants are created in the management > tenant table.
Hi @meherpanguluri ! I just released 2.0.0-beta.3. It may fix your issues. If not, can you create a github repository with a reproductible example of the issue ? Otherwise, I'm not able to reproduce and fix it
Since there hasn't been activity on this issue for a while, I'll close it. Don't hesitate to reopen it if needed
Hi, This is my .env in prisma
DATABASE_URL="postgresql://postgres:postgres@localhost:32769/tenant?schema=public" MANAGEMENT_PROVIDER=postgresql MANAGEMENT_URL=postgresql://postgres:postgres@localhost:32769/management
I have created two databases for management and tenants. I dont see any schemas created in the tenant database for new tenants. Not sure from the documentation if we need to create two databases?
Thanks