-1

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.

New contributor
Russel Edullantes is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2
  • 1) Did you follow the instructions in the error message, that it is indeed running? 2) Is the firewall setup to allow connections on port 5432 at the host? 3) Are you sure the database is listening on port 5432? 4) Can you connect to the database via some other client, psql? Commented Nov 16 at 16:31
  • 1
    Network configuration problems are off-topic. Commented Nov 16 at 17:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.