Skip to content

Commit de7d344

Browse files
TheOtherBrian1Brian Brennglass
andauthored
update prisma docs (supabase#31216)
Co-authored-by: Brian Brennglass <[email protected]>
1 parent 2bb3a4b commit de7d344

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

apps/docs/content/guides/database/prisma.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ If you plan to solely use Prisma instead of the Supabase Data API (PostgREST), t
4545
alter default privileges for role postgres in schema public grant all on routines to prisma;
4646
alter default privileges for role postgres in schema public grant all on sequences to prisma;
4747
```
48+
49+
```sql
50+
-- alter prisma password if needed
51+
alter user "prisma" with password 'new_password';
52+
```
4853
</StepHikeCompact.Code>
4954

5055
</StepHikeCompact.Step>
@@ -118,14 +123,12 @@ If you plan to solely use Prisma instead of the Supabase Data API (PostgREST), t
118123
<StepHikeCompact.Step step={3}>
119124
<StepHikeCompact.Details title="Add your connection information to your .env file">
120125
- Visit the [Database Settings](https://supabase.com/dashboard/project/_/settings/database)
121-
![Session Mode](/docs/img/database/session-mode.png)
122126
- Find your Supavisor Session Mode string. It should end with 5432. It will be used in your `.env` file.
123127
<Admonition type="note">
124128
If you're in an [IPv6 environment](https://github.com/orgs/supabase/discussions/27034) or have the IPv4 Add-On, you can use the direct connection string instead of Supavisor in Session mode.
125129
</Admonition>
126130

127131
- If you plan on deploying Prisma to a serverless or auto-scaling environment, you'll also need your Supavisor transaction mode string.
128-
![Transaction Mode](/docs/img/database/transaction-mode.png)
129132
- The string is identical to the session mode string but uses port 6543 at the end.
130133

131134

@@ -137,7 +140,7 @@ If you plan to solely use Prisma instead of the Supabase Data API (PostgREST), t
137140
In your .env file, set the DATABASE_URL variable to your connection string
138141
```text .env
139142
# Used for Prisma Migrations and within your application
140-
DATABASE_URL="postgres://[DB-USER].[PROJECT-REF]:[YOUR-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:5432/postgres"
143+
DATABASE_URL="postgres://[DB-USER].[PROJECT-REF]:[PRISMA-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:5432/postgres"
141144
```
142145

143146
Change your string's `[DB-USER]` to `prisma` and add the password you created in step 1
@@ -152,10 +155,10 @@ If you plan to solely use Prisma instead of the Supabase Data API (PostgREST), t
152155
Next, create a DIRECT_URL variable in your .env file and assign the connection string that ends with port 5432 to it.
153156

154157
```text .env # Used in your application (use transaction mode)
155-
DATABASE_URL="postgres://[DB-USER].[PROJECT-REF]:[YOUR-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:6543/postgres?pgbouncer=true"
158+
DATABASE_URL="postgres://[DB-USER].[PROJECT-REF]:[PRISMA-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:6543/postgres?pgbouncer=true"
156159
157160
# Used for Prisma Migrations (use session mode or direct connection)
158-
DIRECT_URL="postgres://[DB-USER].[PROJECT-REF]:[YOUR-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:5432/postgres"
161+
DIRECT_URL="postgres://[DB-USER].[PROJECT-REF]:[PRISMA-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:5432/postgres"
159162
```
160163

161164
Change both your strings' `[DB-USER]` to `prisma` and then add the password created in step 1

0 commit comments

Comments
 (0)