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

1 messages · Page 1 of 1 (latest)

stone pecan
#

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"

Any ideas what the issue is here?

sterile shellBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

hoary isle
#

Hey @stone pecan 👋

Can you try using the non-pooled connection string, the one with port 5432 and check?

stone pecan
#

Hey @hoary isle that solution works! So does this mean I won't be using the connection pooler?

hidden gazelle
# stone pecan Hey <@411073381471879169> that solution works! So does this mean I won't be usin...

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

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.

sterile shellBOT
minor pasture
#

thank you so much i just tried this and it works