Skip to content

docs(docs): replace hosted Accelerate connections in the Netlify, viewing-data and Console guides - #8220

Merged
sneub merged 8 commits into
mainfrom
prisma/replace-accelerate-connection-examples
Sep 8, 2026
Merged

docs(docs): replace hosted Accelerate connections in the Netlify, viewing-data and Console guides#8220
sneub merged 8 commits into
mainfrom
prisma/replace-accelerate-connection-examples

Conversation

@prisma-robot

@prisma-robot prisma-robot Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Overview

Three Prisma Postgres pages still told users to connect through the hosted Accelerate connection that #8218 documents as retiring on December 1, 2026, and carried no retirement notice. This rewrites them to the supported connection paths and keeps the remaining Accelerate URLs only inside :::warning[Accelerate retirement] blocks that link to Connect to Prisma Postgres without Accelerate.

What it delivers

guides/postgres/netlify.mdx

  • The example app now instantiates Prisma Client with PrismaPg from @prisma/adapter-pg over a pooled TCP connection string instead of withAccelerate() + accelerateUrl. Netlify Functions run on a conventional Node.js runtime, so pooled TCP is the recommended path.
  • Documents the pooled DATABASE_URL (pooled.db.prisma.io) for application queries and a direct DIRECT_URL (db.prisma.io) for Prisma CLI commands, with prisma.config.ts pointing at DIRECT_URL, matching Connecting to your database. Notes that DIRECT_URL must also be set in the Netlify site environment so the postinstall generate step can resolve it.
  • Sample package.json swaps @prisma/extension-accelerate for @prisma/adapter-pg and pg, and the setup steps install them.
  • Adds the retirement warning for existing sites whose extension-provided DATABASE_URL is still a hosted Accelerate URL.

guides/postgres/viewing-data.mdx

  • Prisma Studio: documents the direct connection string and a prisma.config.ts that reads DIRECT_URL, so the CLI bypasses the pooler.
  • Third-party editors (TablePlus, DataGrip, DBeaver, Postico) now connect straight to db.prisma.io:5432 with sslmode=require, with a field table for host/port/database/user/password. This replaces the @prisma/ppg-tunnel walkthrough, which existed only because the hosted Accelerate URL could not be used over TCP; the retirement warning names the tunnel as the legacy path and points at the transition guide.

console/getting-started.mdx

  • Step 6 now shows pooled and direct Prisma Postgres connection strings and points to @prisma/adapter-pg for Node runtimes and the serverless driver for edge/TCP-constrained runtimes. The old prisma://accelerate.prisma-data.net/?api_key=... example survives only inside the retirement warning.

No withAccelerate, accelerateUrl or accelerate.prisma-data.net remains in these three files outside an explicit retirement warning.

How I tested it

From apps/docs, on the merged head:

  • pnpm lint:links — 687 files, 0 errors
  • pnpm lint:spellcheck — 826 files, 0 issues
  • pnpm test:llm-markdown — 9/9 snapshots pass
  • pnpm lint:code — no new violations in the touched files (netlify 6 → 6, console 1 → 1, viewing-data 7 → 3); repo total 6313 → 6309
  • pnpm lint:images, pnpm lint:agent-ready, pnpm test — clean

Assumptions and decisions

  • This branch was started from feat: serverless driver docs #8218's head branch, because /postgres/database/switch-from-accelerate did not exist on main yet and the warning links would otherwise fail lint:links. feat: serverless driver docs #8218 merged while the work was in progress, so main was merged in (not rebased, to avoid a force-push); the diff against main is exactly the three files.
  • The @prisma/ppg-tunnel walkthrough in viewing-data.mdx was removed rather than kept behind a warning: with direct TCP credentials available from Console for every Prisma Postgres database, the tunnel is no longer needed for GUI editors, and every tunnel example required a hosted Accelerate URL. Happy to restore it as a clearly-labelled legacy section if you prefer.
  • The Netlify guide keeps the extension-provided DATABASE_URL as the application connection string, mirroring the sibling guides/postgres/vercel.mdx page, and adds DIRECT_URL only for CLI use.
  • The new prisma.config.ts snippet in viewing-data.mdx imports from prisma/config, matching postgres/database/*; the older guides/postgres/* pages still import from @prisma/config (see follow-ups).
  • Commit bodies carry Refs: prisma/web#8218 rather than a Linear reference, since no Linear issue was supplied with this task.

Follow-ups noticed, left alone

  • guides/postgres/netlify.mdx and guides/postgres/vercel.mdx import defineConfig/env from @prisma/config, while postgres/database/* and orm/v7/* use prisma/config. Worth aligning across the guides in one pass.
  • The img/ppg-tableplus.png, ppg-datagrip.png, ppg-dbeaver.png and ppg-postico.png screenshots still show 127.0.0.1 tunnel connections; the surrounding text now describes a direct db.prisma.io connection. New screenshots would make the page consistent.
  • console/getting-started.mdx still has a "For Accelerate" resource-creation step in Step 4 that predates the retirement announcement.

luanvdw and others added 7 commits September 7, 2026 17:57
…ate transition guide

The Prisma 7 tabs never moved prisma.config.ts off the Accelerate URL, which the
to-v7 upgrade page tells Accelerate users to put there, so CLI commands would keep
using the retiring connection. Add a prisma.config.ts snippet to both Prisma 7 paths.
Also list @prisma/client/edge in the search and removal steps: a v6 edge client
requires an Accelerate URL and fails at runtime with a postgres:// string.
Fix a dangling colon on the serverless driver page.
…retirement in the v7 upgrade guide

- no-rust-engine.mdx: the snippet titled src/lib/prisma.ts imported
  ../generated/prisma/client, which resolves to src/generated; use
  ../../generated/prisma/client to match the generator output.
- guides/upgrade-prisma-orm/v7.mdx: apply the same Accelerate retirement
  notice and wording that this PR added to orm/v6/more/upgrades/to-v7.mdx,
  so the two copies of the upgrade guide agree.
…sole guides

Rewrite the Netlify guide to use the pg driver adapter with a pooled TCP
connection string, document direct TCP for Prisma Studio and third-party
database editors, and show pooled/direct Prisma Postgres URLs in the
Console getting-started guide. Remaining Accelerate URLs are kept only
inside retirement warnings that link to the transition guide.

Refs: #8218
…uide

Split the Netlify example into a pooled application connection string and
a direct connection string for Prisma CLI commands, and title the new
install code block so lint:code reports no new violations.

Refs: #8218
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
blog Ready Ready Preview Sep 8, 2026 10:08am UTC
docs Ready Ready Preview Sep 8, 2026 10:08am UTC
eclipse Ready Ready Preview Sep 8, 2026 10:08am UTC
site Ready Ready Preview Sep 8, 2026 10:08am UTC

Request Review

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🍈 Lychee Link Check Report

31 links: ✅ 8 OK | 🚫 0 errors | 🔀 6 redirects | 👻 23 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 8
🔀 Redirected 6
👻 Excluded 23
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

The step-by-step example told readers to put the pooled string in
DATABASE_URL and the direct string in DIRECT_URL, but `prisma init`
generates a prisma.config.ts that reads DATABASE_URL, and no step said to
change it. The following `prisma migrate dev` and `prisma studio` steps
would therefore run through the connection pooler, which the connecting
guide documents as failing for migrations.

- Add a tutorial step that switches the generated prisma.config.ts to
  DIRECT_URL, and tell readers in step 2 to keep both connection strings.
- Replace the `../path/to/generated/prisma/client` placeholder with the
  real path implied by the schema's `output` in the same tutorial.
- Import from `prisma/config` in the Additional considerations snippet,
  matching what `prisma init` generates and the Prisma Config reference.

Refs: #8218
@prisma-robot

prisma-robot Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Reviewed 201d9a7b9a21c77ed93c92170e4114172bc5ffbd (full diff, surrounding pages, and the gates: lint:links, lint:spellcheck, test:llm-markdown, lint:code, lint:images, lint:agent-ready, test all pass). One finding, fixed in 565d5e6a57112d034398c98bbe047cdae211b7b9.

Found: in guides/postgres/netlify.mdx, the step-by-step example (section 3) has the reader put the pooled string in DATABASE_URL and the direct string in DIRECT_URL, then run prisma migrate dev and prisma studio. But prisma init generates a prisma.config.ts that reads DATABASE_URL (see the CLI reference: "Configure your DATABASE_URL in prisma.config.ts"), and no step said to change it. Followed literally, the migration and Studio steps go through the pooler, which /postgres/database/connecting-to-your-database documents as failing with lock / prepared-statement errors. The "Additional considerations" section covers this, but the tutorial only linked there for the .env values.

Changed (Netlify guide only):

  • Added a tutorial step after the .env step that switches the generated prisma.config.ts to env("DIRECT_URL"), with a [!code --]/[!code ++] snippet; renumbered the following step. Step 2 now says to keep both connection strings, not just the pooled one.
  • Replaced the ../path/to/generated/prisma/client placeholder in the rewritten app/page.jsx block with ../src/generated/prisma/client, the path the schema's output in the same tutorial produces.
  • The prisma.config.ts snippet in "Additional considerations" now imports from prisma/config and carries a title, matching what prisma init generates and the Prisma Config reference (lint:code on the page 6 → 5).

Everything else read correctly against the connecting, serverless-driver and switch-from-accelerate pages. Will re-review the new head from scratch.

— reviewer

@sneub
sneub merged commit 920fbf4 into main Sep 8, 2026
16 checks passed
@sneub
sneub deleted the prisma/replace-accelerate-connection-examples branch September 8, 2026 10:12
@prisma-robot

prisma-robot Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Re-reviewed 565d5e6a57112d034398c98bbe047cdae211b7b9 from scratch, including my own round-1 fix. main had moved by one commit (#8221, sidebar banner removal and index links, unrelated files) so I merged it in and ran the gates on the merged tree: lint:links 0 errors, lint:spellcheck 0 issues, test:llm-markdown 9/9, lint:code 6308 total with only the pre-existing "missing title" warnings in the touched files, lint:images, lint:agent-ready and test all clean.

One finding, fixed in ecc2c30bbe563f44aba3bd129dab75d9e0b6bd76.

Found: in console/getting-started.mdx, the retirement warning called prisma://accelerate.prisma-data.net/?api_key=… a "hosted Accelerate connection for Prisma Postgres". That form belongs to standalone Accelerate environments (see accelerate/getting-started.mdx, and it is the Step 4 "For Accelerate" resource on this same page). Hosted Prisma Postgres uses prisma+postgres://accelerate.prisma-data.net/?api_key=…, as postgres/database/switch-from-accelerate documents. A reader deciding which of the two linked migration paths applies was being told the wrong label.

Changed: the warning now names both forms and ties them to their products: Accelerate environments from Step 4 use prisma://…, hosted Prisma Postgres uses prisma+postgres://…. Nothing else changed.

Checked and left alone: the Netlify guide's "set DIRECT_URL in the site environment so postinstall can resolve it" is correct, because the Prisma Config reference documents env() throwing when the variable is missing even for prisma generate; the "extension sets DATABASE_URL to a postgres:// string" claim matches what the sibling Vercel guide says about its integration; the serverless-driver "direct connection string" statement on the Console page matches the serverless-driver reference.

Will re-review the new head from scratch.

— reviewer

@prisma-robot

prisma-robot Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Closing out the review: this PR was approved and merged at 565d5e6a57112d034398c98bbe047cdae211b7b9 (merge commit 920fbf448bfbcc70e9fafbb108808ad2959f8b6f) at 10:12 UTC, three minutes before my round-2 push. So ecc2c30bbe563f44aba3bd129dab75d9e0b6bd76 sits on the closed branch and is not on main; the only difference between that commit and main is the one sentence in console/getting-started.mdx (line 96) that still labels prisma://accelerate.prisma-data.net/?api_key=… as the hosted Prisma Postgres form when it is the standalone Accelerate form (prisma+postgres://… is the Prisma Postgres one).

What merged is the round-1 head, which I had already read in full and gated (lint:links, lint:spellcheck, test:llm-markdown, lint:code, lint:images, lint:agent-ready, test); the round-2 cold read found nothing beyond that one label. Risk of what shipped: low. The remaining defect is a mislabel inside a warning box that still links to both migration paths, not a broken instruction.

Since the branch is closed I have not pushed anything further. I proposed a follow-up builder task (awaiting human approval) to land that one-line fix through a fresh PR from main; cherry-picking ecc2c30b is enough. No merge was performed by me.

— reviewer

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.

3 participants