From 3b39c7672deea7a1b16eb9ff5b0c027d60851e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Galeran?= Date: Thu, 2 Nov 2023 09:38:18 +0100 Subject: [PATCH] Update 880-supabase.mdx Fix connection strings to make them similar to what Supabase provides --- content/300-guides/050-database/880-supabase.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/300-guides/050-database/880-supabase.mdx b/content/300-guides/050-database/880-supabase.mdx index 870b4a5126..01368630a9 100644 --- a/content/300-guides/050-database/880-supabase.mdx +++ b/content/300-guides/050-database/880-supabase.mdx @@ -35,14 +35,14 @@ need to add `pgbouncer=true` to the end of the `DATABASE_URL` environment variab ```env file=.env # Connect to Supabase with PgBouncer. -DATABASE_URL="postgres://postgres:__PASSWORD__@db.__YOUR_SUPABASE_PROJECT__.supabase.co:6543/postgres?pgbouncer=true" +DATABASE_URL="postgres://postgres.__YOUR_SUPABASE_PROJECT__:__PASSWORD__@daws-0-eu-central-1.pooler.supabase.co:6543/postgres?pgbouncer=true" ``` If you would like to use the Prisma CLI in order to perform other actions on your database (e.g. migrations) you will need to add a `DIRECT_URL` environment variable to use in the `datasource.directUrl` property so that the CLI can bypass PgBouncer: ```env file=.env highlight=4-5;add # Connect to Supabase with PgBouncer. -DATABASE_URL="postgres://postgres:__PASSWORD__@db.__YOUR_SUPABASE_PROJECT__.supabase.co:6543/postgres?pgbouncer=true" +DATABASE_URL="postgres://postgres.__YOUR_SUPABASE_PROJECT__:__PASSWORD__@daws-0-eu-central-1.pooler.supabase.co:6543/postgres?pgbouncer=true" # Direct connection to the database. Used for migrations. DIRECT_URL="postgres://postgres:__PASSWORD__@db.__YOUR SUPABASE_PROJECT__.supabase.co:5432/postgres"