You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
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:
zf [Error]:
Invalid `prisma.tenant.findOne()` invocation:
Error in connector: Error querying the database: db error: ERROR: zero-length delimited identifier at or near """"
at $w.request (/usr/src/app/node_modules/.prisma-multi-tenant/management/runtime/index.js:212:257)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
clientVersion: '2.9.0'
}
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.
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
The text was updated successfully, but these errors were encountered: