P
Prisma•7mo ago
gaurav1998

npx prisma migrate dev --name init from tutorial not working

Once I get to the part in the supabase prisma tutorial where I run the command npx prisma migrate dev --name init the terminal gets stuck at:
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "aws-0-us-west-1.pooler.supabase.com:6543"
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "aws-0-us-west-1.pooler.supabase.com:6543"
Any ideas what the issue is here?
Solution:
Hey @Nurul that solution works! So does this mean I won't be using the connection pooler?
Jump to solution
5 Replies
Nurul
Nurul•7mo ago
Hey @gaurav1998 👋 Can you try using the non-pooled connection string, the one with port 5432 and check?
Solution
gaurav1998
gaurav1998•7mo ago
Hey @Nurul that solution works! So does this mean I won't be using the connection pooler?
jonfanz
jonfanz•7mo ago
No, you can. You just need a direct URL (as in not a pooled connection) for migrations. This part of our docs goes into a bit more detail: https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/databases-connections/pgbouncer#prisma-migrate-and-pgbouncer-workaround
Configure Prisma Client with PgBouncer | Prisma Documentation
An external connection pooler like PgBouncer holds a connection pool to the database, and proxies incoming client connections by sitting between Prisma Client and the database. This reduces the number of processes a database has to handle at any given time.
himanshu
himanshu•5mo ago
thank you so much i just tried this and it works
Nurul
Nurul•5mo ago
I am glad to hear 😄
Want results from more Discord servers?
Add your server