How to fix Error: P1017: Server has closed the connection. supabase
I have just installed prisma , then i coded this:
generator client {
provider = "prisma-client-js"
output = "../src/generated/prisma"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
telegramId String @unique
promoCode String @unique
}
after
npx prisma migrate dev I got that error Error: P1017: Server has closed the connection2 Replies
Is any operation working?
What connection method are you using?
Make sure to follow the guide closely https://supabase.com/docs/guides/database/prisma
and the connection type based on if you have IPv4.
Prisma | Supabase Docs
Prisma Quickstart
I have fixed it thanks