#multiSchema variable

10 messages · Page 1 of 1 (latest)

boreal musk
#

Hi all, im trying to use .env to replace schemas value

datasource db { provider = "postgresql" url = env("DATABASE_URL") schemas = ["base", "transactional"] }

change to
datasource db { provider = "postgresql" url = env("DATABASE_URL") schemas = [env("db")] }

but i got the error Expected a string value, but received functional value env("db").

any idea for this?

wet crystal
#

must be the issue in file structure

boreal musk
wet crystal
#

put the .env file in the root folder

fading basin
fading basin
#

No worries 🙂

stoic arrow
stoic arrow
#

I am trying to do const authUsers = await prisma.auth.user.findMany()

// Query the user table in the public schema
const publicUsers = await prisma.public.user.findMany()

#

I am trying to do ```js
const authUsers = await prisma.auth.user.findMany()

// Query the user table in the public schema
const publicUsers = await prisma.public.user.findMany()```