PrismaP
Prisma4w ago
1 reply
Volker

sveltekit Postgres and Prisma 7 upgrade Database schema not used in connection url

Hi

after migration to Prisma 7 I ve adjusted my db connection code according to the Prisma guide:

const adapter = new PrismaPg({
    connectionString: databaseUrl,
});

const db = new PrismaClient({
    adapter,
});

export default db


My databaseurl includes a DB Schema:
postgresql://postgres:<passwoerd>@test-db:5432/testdb?schema=fitzbek


If I try to connect getting error which indicates that default schema public is used, how may I correctly specify which db schema to be used ?

and as an additional information... Schema name is not the same for all environments I am deploying to. I need a somehow dynamic solution

025-12-24T12:39:06.612092708Z PrismaClientKnownRequestError: 
2025-12-24T12:39:06.612097290Z Invalid `prisma.BigEvent.findFirst()` invocation:
2025-12-24T12:39:06.612101844Z 
2025-12-24T12:39:06.612106084Z 
2025-12-24T12:39:06.612110734Z The table `public.TractorPullingEvent` does not exist in the current database.
Was this page helpful?