Skip to content

Commit

Permalink
Update 880-supabase.mdx (#5418)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 authored Nov 2, 2023
1 parent eedcc8a commit f869295
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/300-guides/050-database/880-supabase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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__@aws-0-eu-central-1.pooler.supabase.com: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__@aws-0-eu-central-1.pooler.supabase.com: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"
Expand Down

1 comment on commit f869295

@vercel
Copy link

@vercel vercel bot commented on f869295 Nov 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./

docs-prisma.vercel.app
prisma2-docs.vercel.app
docs-git-main-prisma.vercel.app

Please sign in to comment.