Supabase integration env variables are not correct using prisma

Hello!

I found out that env variables are not correctly generated for supabase integration while using prisma.

I am able to use the Supabase Integration with my local POSTGRES_PRISMA_URL variable. But as I cannot edit the variables for the integration, it does not work when deployed.

The variable that works at my local ends in /postgres?pgbouncer=true

Your auto generated variable ends in /postgres?sslmode=require&supa=base-pooler.x and does not work either production or locally.

The rest of variable is the same and its correct.

Thank you very much.

Hey @magondevs. It looks like you have a different issue than the original topic so I moved your post to its own new thread.

Do you have a public repo or minimal reproducible example that you can share here? Or just walk me through the steps you followed to set up the Supabase integration and Prisma. That will give me a better understanding of the issue so I can help you find a solution :smile:

Hello, thanks for the quick response.

Basically I followed this steps:

  1. Created the start project by cloning https://vercel.com/templates/next.js/postgres-prisma
  2. After some time developing, decided to create a test environment database using supabase. But I followed the supabase recomendation to connect my local instead of using the autogenerated vercel environment variables:
  3. The DB was working fine but at vercel preview deployment prisma was not able to connect.
  4. I checked the autogenerated POSTGRES_PRISMA_URL and it’s different from the one that Supabase recommends, and definitely not working. /postgres?sslmode=require&supa=base-pooler.x vs /postgres?pgbouncer=true
  5. Can’t edit any variable because they are autogenerated, I could use another name but POSTGRES_PRISMA_URL seems a nice convention.

Also mention that the button that should allow me to manage connection (at the popover for the environment variable) just opens a black screen.

Thank you very much, let me know if you need extra information from my side.