Skip to content

Revise local development instructions for Prisma Postgres to current …#7874

Merged
aidankmcalister merged 1 commit intoprisma:mainfrom
stevepiercy:patch-2
May 7, 2026
Merged

Revise local development instructions for Prisma Postgres to current …#7874
aidankmcalister merged 1 commit intoprisma:mainfrom
stevepiercy:patch-2

Conversation

@stevepiercy
Copy link
Copy Markdown
Contributor

@stevepiercy stevepiercy commented May 7, 2026

…experience

Description

After successfully walking through the Quickstart for Prisma Postgres at https://www.prisma.io/docs/prisma-orm/quickstart/prisma-postgres, I then tried Local development at https://www.prisma.io/docs/postgres/database/local-development. I was able to complete Step 1. Note that I used pnpm, not npx.

Loaded Prisma config from prisma.config.ts.

✔  Your local Prisma Postgres server default is now running 👍

🔌 To connect with Prisma ORM use the following connection strings:

DATABASE_URL="postgres://postgres:postgres@localhost:51214/template1?sslmode=disable&connection_limit=10&connect_timeout=0&max_idle_connection_lifetime=0&pool_timeout=0&socket_timeout=0"
   SHADOW_DATABASE_URL="postgres://postgres:postgres@localhost:51215/template1?sslmode=disable&connection_limit=10&connect_timeout=0&max_idle_connection_lifetime=0&pool_timeout=0&socket_timeout=0"

🐘 You can also use the DATABASE_URL with the pg or postgres.js JavaScript drivers as well as your favorite DB gui.

   For the best experience, set the maximum number of connections to 10, connect timeout to 0 and
   idle timeout to the smallest positive value supported.

🌊 Prisma Streams is available at:

   PRISMA_STREAM_URL="http://127.0.0.1:51216/v1/stream/prisma-wal"

┌─────────────────┐
│ Press q to quit │
└─────────────────┘

This is different from what the documentation shows.

I checked that what I have installed is current as of May 4, 2026.

Prisma schema loaded from prisma/schema.prisma.
prisma               : 7.8.0
@prisma/client       : 7.8.0
Operating System     : darwin
Architecture         : arm64
Node.js              : v24.15.0
TypeScript           : unknown
Query Compiler       : enabled
PSL                  : @prisma/prisma-schema-wasm 7.8.0-6.3c6e192761c0362d496ed980de936e2f3cebcd3a
Schema Engine        : schema-engine-cli 3c6e192761c0362d496ed980de936e2f3cebcd3a (at ../../Library/Caches/pnpm/dlx/8b96e82ed7198c2bd4f4b575220ebeb232bf51e6b54cd352d9811fb6b861b66c/19e012ec58f-1782/node_modules/.pnpm/@prisma+engines@7.8.0/node_modules/@prisma/engines/schema-engine-darwin-arm64)
Default Engines Hash : 3c6e192761c0362d496ed980de936e2f3cebcd3a
Studio               : 0.27.3

Additionally, I'm not able to complete Step 2. I'm using the same project as that from the Quickstart, with the exception of changing the .env DATABASE_URL to that from Step 1.

Here's the console output from Step 2:

$ pnpm dlx prisma migrate dev            
Loaded Prisma config from prisma.config.ts.

Prisma schema loaded from prisma/schema.prisma.
Datasource "db": PostgreSQL database "template1", schema "public" at "localhost:51214"

Error: P1017
Server has closed the connection.

And I checked whether the server was in fact running.

$ pnpm dlx prisma dev ls                         
Loaded Prisma config from prisma.config.ts.

Fetching latest updates for this subcommand...
npm notice
npm notice New minor version of npm available! 11.6.0 -> 11.14.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.14.0
npm notice To update run: npm install -g npm@11.14.0
npm notice
 name     status   urls                                                                                                                                                                        
 default  running  DATABASE_URL:                                                
                   prisma+postgres://localhost:51213/?api_key=eyJk...AifQ 
                   STREAM: http://127.0.0.1:51216/v1/stream/prisma- 
                   wal                                                    
                   TCP:                                                         
                   postgres://...@localhost:51214/... 
                   Terminal: ...psql -h       
                   localhost -p 51214 ...                                 

I've also asked for support for Step 2 on Discord at https://discord.com/channels/937751382725886062/1501160844875268226/1501160844875268226.

Please let me know if you need further clarification, or if I should try something else.

Also would you please verify whether the current documentation is in fact correct?

Thank you!

Summary by CodeRabbit

  • Documentation
    • Updated local development guide with explicit connection string information for Prisma Postgres setup, including DATABASE_URL and SHADOW_DATABASE_URL environment variables and guidance for using these with other drivers and tools.

…experience

After successfully walking through the Quickstart for Prisma Postgres at https://www.prisma.io/docs/prisma-orm/quickstart/prisma-postgres, I then tried Local development at https://www.prisma.io/docs/postgres/database/local-development. I was able to complete Step 1. 

```$ pnpm dlx prisma dev
Loaded Prisma config from prisma.config.ts.

✔  Your local Prisma Postgres server default is now running 👍

🔌 To connect with Prisma ORM use the following connection strings:

DATABASE_URL="postgres://postgres:postgres@localhost:51214/template1?sslmode=disable&connection_limit=10&connect_timeout=0&max_idle_connection_lifetime=0&pool_timeout=0&socket_timeout=0"
   SHADOW_DATABASE_URL="postgres://postgres:postgres@localhost:51215/template1?sslmode=disable&connection_limit=10&connect_timeout=0&max_idle_connection_lifetime=0&pool_timeout=0&socket_timeout=0"

🐘 You can also use the DATABASE_URL with the pg or postgres.js JavaScript drivers as well as your favorite DB gui.

   For the best experience, set the maximum number of connections to 10, connect timeout to 0 and
   idle timeout to the smallest positive value supported.

🌊 Prisma Streams is available at:

   PRISMA_STREAM_URL="http://127.0.0.1:51216/v1/stream/prisma-wal"

┌─────────────────┐
│ Press q to quit │
└─────────────────┘
```

This is different from what the documentation shows.

I checked that what I have installed is current as of May 4, 2026.

```
Prisma schema loaded from prisma/schema.prisma.
prisma               : 7.8.0
@prisma/client       : 7.8.0
Operating System     : darwin
Architecture         : arm64
Node.js              : v24.15.0
TypeScript           : unknown
Query Compiler       : enabled
PSL                  : @prisma/prisma-schema-wasm 7.8.0-6.3c6e192761c0362d496ed980de936e2f3cebcd3a
Schema Engine        : schema-engine-cli 3c6e192761c0362d496ed980de936e2f3cebcd3a (at ../../Library/Caches/pnpm/dlx/8b96e82ed7198c2bd4f4b575220ebeb232bf51e6b54cd352d9811fb6b861b66c/19e012ec58f-1782/node_modules/.pnpm/@prisma+engines@7.8.0/node_modules/@prisma/engines/schema-engine-darwin-arm64)
Default Engines Hash : 3c6e192761c0362d496ed980de936e2f3cebcd3a
Studio               : 0.27.3
```

---

Additionally, I'm not able to complete Step 2. I'm using the same project as that from the Quickstart, with the exception of changing the `.env` `DATABASE_URL` to that from Step 1.

Here's the console output from Step 2:

```shell
$ pnpm dlx prisma migrate dev            
Loaded Prisma config from prisma.config.ts.

Prisma schema loaded from prisma/schema.prisma.
Datasource "db": PostgreSQL database "template1", schema "public" at "localhost:51214"

Error: P1017
Server has closed the connection.
```

I've also asked for support for Step 2 on Discord at https://discord.com/channels/937751382725886062/1501160844875268226/1501160844875268226.

Please let me know if you need further clarification, or if I should try something else. Also please verify whether the current documentation is in fact correct. Thank you!
@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

@stevepiercy is attempting to deploy a commit to the Prisma Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Review Change Stack

Walkthrough

The local development guide for Prisma Postgres is updated with a current example of the npx prisma dev command output. The terminal UI now explicitly displays DATABASE_URL, SHADOW_DATABASE_URL, and PRISMA_STREAM_URL connection strings, along with updated instructions on how developers can view and use these URLs.

Changes

Prisma Postgres Dev Setup Documentation

Layer / File(s) Summary
Example Output and Instructions
apps/docs/content/docs/postgres/database/local-development.mdx
The npx prisma dev sample output is updated from a "Great Success" message to a detailed output showing DATABASE_URL, SHADOW_DATABASE_URL, and PRISMA_STREAM_URL connection strings. The keyboard instructions are updated to reflect these new options.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Revise local development instructions for Prisma Postgres to current...' clearly and specifically identifies the primary change: updating documentation to reflect the current developer experience with Prisma Postgres local development.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/content/docs/postgres/database/local-development.mdx`:
- Around line 33-36: The DATABASE_URL and SHADOW_DATABASE_URL examples currently
use a plain postgres:// scheme but later text instructs copying a
prisma+postgres:// value into .env causing confusion for Prisma migrations;
update the docs so the two examples and the later instruction are consistent:
either (A) change the example connection strings to prisma+postgres:// for
Prisma/ORM usage and note any different ports if required for shadow DB, or (B)
explicitly state that the shown postgres:// strings are direct Postgres URLs and
show a second example of the prisma+postgres:// format to be placed in .env for
prisma migrate dev, and update the prose around copying into .env to reference
DATABASE_URL/SHADOW_DATABASE_URL accordingly (mention DATABASE_URL,
SHADOW_DATABASE_URL, and prisma migrate dev in the text to make the mapping
explicit).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0b57a4ba-8315-4359-92f9-b91a9140d6d8

📥 Commits

Reviewing files that changed from the base of the PR and between b44311b and e53b77e.

📒 Files selected for processing (1)
  • apps/docs/content/docs/postgres/database/local-development.mdx

Comment thread apps/docs/content/docs/postgres/database/local-development.mdx
@aidankmcalister aidankmcalister merged commit a67bcd0 into prisma:main May 7, 2026
1 of 5 checks passed
@aidankmcalister
Copy link
Copy Markdown
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants