The guide was right about 6543 (transaction pooler), but Prisma needs to know it's behind a pooler so it stops using prepared statements:
DATABASE_URL="postgresql://postgres.<ref>:<pw>@aws-0-<region>.pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1"
DIRECT_URL="postgresql://postgres.<ref>:<pw>@aws-0-<region>.pooler.supabase.com:5432/postgres"datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}pgbouncer=true turns off prepared statements. connection_limit=1 keeps each serverless instance to one connection. directUrl is used by prisma migrate, which needs a session connection.
?pgbouncer=trueat the end of your DATABASE_URL? rafa_dev · edited