This is the schema in my prisma.schema:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}
Please make sure your database server is running at `aws-1-ap-south-1.pooler.supabase.com:5432`.
I followed the supabase documentation for connecting prisma to supabase at this link:
https://supabase.com/docs/guides/database/prisma
This was how I structured my DATABASE_URL and DIRECT_URL in my .env file:
DATABASE_URL="postgresql://prisma.[PROJECT-REF]:[PRISMA-PASSWORD]@aws-1-ap-south-1.pooler.supabase.com:6543/postgres?pgbouncer=true"
DIRECT_URL="postgresql://prisma.[PROJECT-REF]:[PRISMA-PASSWORD]@aws-1-ap-south-1.pooler.supabase.com:5432/postgres?sslmode=require"
I've also added directUrl to my prisma config file but I just can't seem to make it work.
5432at the host? 3) Are you sure the database is listening on port5432? 4) Can you connect to the database via some other client, psql?