Closed jimsimon closed 4 years ago
I believe I found the problem...
I added a console.log(process.env.MANAGEMENT_URL)
and it appears the =dev
part of the url is being lost. This only seems to be a problem for the management environment variable. Since I'm using the default schema, I'm able to workaround this issue by removing the entire ?schema=public
part.
After doing some more research, I suspect this might be related to being unable to use quotes for the management url (#60). It might also be related to how the url is being read or parsed somewhere in the code.
Hi @jimsimon! Thanks for reporting the issue. 🙏 It may indeed come from #60 which has been resolved with the release of prisma-multi-tenant 2.4.1. Don't hesitate to reopen if you still encounter the issue after upgrading!
Hello!
I'm running into an issue actually using the tenant client. I've successfully set up the management database, added a tenant, and verified that I can connect to that tenant directly via the normal PrismaClient. However when I try to use MultiTenant, I get the following error:
Here's my test code:
I'm using the latest version of Prisma (2.9.0) and working with Postgres database. I'm using one database instance but differentiating between tenants via schema in the connection string.
DATABASE_URL=postgresql://postgres@db:5432/app?schema=dev MANAGEMENT_URL=postgresql://postgres@db:5432/app?schema=public