P
Prisma7mo ago
Simon

Using queryCompiler, PrismaClient doesn't honor Postgres schema from config

I'm attempting to upgrade to the queryCompiler preview feature and the Postgres adapter. My connectionUrl specifies a Postgres schema (?schema=core), but the PrismaClient throws errors because it "cannot find table public.XXX", implying it does not honor the intended schema value. I have also attempted to provide the schema via the adapter options object, but to no avail. Has anyone else encountered this issue? Any fixes or workarounds?
3 Replies
Prisma AI Help
Prisma AI Help7mo ago
You chose to debug with a human. They'll tinker with your query soon. If you get curious meanwhile, hop into #ask-ai for a quick spin!
Simon
SimonOP7mo ago
I found an open issue about this: https://github.com/prisma/prisma/issues/27037
GitHub
[6.7.0] Schema ignored · Issue #27037 · prisma/prisma
Bug description const adapter = new PrismaPg( { connectionString: ${process.env.DATABASE_URL}, }, { schema: searchPath, } ); trying to set schema like this tried in database_url ?schema and ?sear...
Nurul
Nurul7mo ago
It indeed seems like a bug. This is on our ORM team's radar. We plan to fix it soon 🙏

Did you find this page helpful?