Always got stuck when running npx prisma db push
Following on this thread, it's recommend to use DIRECT_URL with port 5432 with some modification on code
// prisma/schema.prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}
// .env
...
DATABASE_URL=postgresql://<user>:<password>@yourhost:6543/postgres?pgbouncer=true
DIRECT_URL=postgresql://<user>:<password>@yourhost:5432/postgres
...