Skip to content

DR-7054- fix(docs): require driver adapter in PrismaClient setup examples#7504

Open
ArthurGamby wants to merge 3 commits intomainfrom
dr-7054-fix-import-clients-docs
Open

DR-7054- fix(docs): require driver adapter in PrismaClient setup examples#7504
ArthurGamby wants to merge 3 commits intomainfrom
dr-7054-fix-import-clients-docs

Conversation

@ArthurGamby
Copy link
Contributor

@ArthurGamby ArthurGamby commented Feb 17, 2026

Summary by CodeRabbit

  • Documentation
    • Updated Prisma Client setup with per-database driver adapter installation instructions (PostgreSQL, MySQL/MariaDB, SQLite)
    • Added configuration and examples showing how to initialize Prisma Client with the appropriate driver adapter and a warning that Prisma 7 requires an adapter
    • Added a new Deno runtime guide demonstrating setup, schema, seeding, and a minimal HTTP server
    • Added Deno to the runtimes documentation index

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 17, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 17, 2026 10:26am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

Walkthrough

Documentation updates add and standardize Prisma driver adapter usage across examples (Postgres, MySQL/MariaDB, SQLite), extend installation instructions per database, add a Deno runtime guide, and include the Deno page in runtimes meta. Multiple code examples now construct adapters and pass them to PrismaClient instead of calling PrismaClient() directly.

Changes

Cohort / File(s) Summary
Driver Adapter docs
apps/docs/content/docs/orm/core-concepts/supported-databases/database-drivers.mdx, apps/docs/content/docs/orm/prisma-client/setup-and-configuration/introduction.mdx
Replaced direct PrismaClient() instantiations with adapter-based patterns (PrismaPg, PrismaMariaDB, PrismaBetterSqlite3) in examples; added per-database npm install instructions, a Prisma 7 adapters note, and a new warning about adapter requirement.
Deno guide
apps/docs/content/docs/guides/runtimes/deno.mdx
Added a new Prisma + Deno + PostgreSQL guide covering setup, configuration, schema/migrations, seeding, and a minimal Deno HTTP server using the generated client.
Runtimes meta
apps/docs/content/docs/guides/runtimes/meta.json
Added "deno" to the runtimes pages list (now ["bun","deno"]).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • Issue #7464: The PR shows new PrismaPg({ connectionString: process.env.DATABASE_URL }), but the PrismaPg constructor expects a pg.Pool or PoolConfig; docs may need to construct/ pass a new Pool({ connectionString }) or the correct config shape.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly reflects the main changes: updating documentation examples to require driver adapters in PrismaClient setup across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2026

🍈 Lychee Link Check Report

3660 links: ✅ 2975 OK | 🚫 19 errors | 🔀 0 redirects | 👻 664 excluded

❌ Errors

./apps/docs/content/docs.v6/(index)/prisma-orm/add-to-existing-project/mongodb.mdx

./apps/docs/content/docs.v6/(index)/prisma-orm/quickstart/mongodb.mdx

./apps/docs/content/docs.v6/ai/index.mdx

./apps/docs/content/docs.v6/guides/solid-start.mdx

./apps/docs/content/docs.v6/orm/more/comparisons/prisma-and-drizzle.mdx

./apps/docs/content/docs.v6/orm/overview/introduction/should-you-use-prisma.mdx

./apps/docs/content/docs.v6/orm/overview/prisma-in-your-stack/graphql.mdx

./apps/docs/content/docs.v6/orm/prisma-client/setup-and-configuration/databases-connections/index.mdx

./apps/docs/content/docs.v6/orm/prisma-client/testing/integration-testing.mdx

./apps/docs/content/docs.v6/orm/prisma-client/testing/unit-testing.mdx

./apps/docs/content/docs.v6/orm/prisma-schema/overview/generators.mdx

./apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx

./apps/docs/content/docs/(index)/prisma-orm/quickstart/mongodb.mdx

./apps/docs/content/docs/ai/index.mdx

./apps/docs/content/docs/guides/frameworks/solid-start.mdx

./apps/docs/content/docs/orm/more/comparisons/prisma-and-drizzle.mdx

./apps/docs/content/docs/orm/prisma-client/testing/integration-testing.mdx

./apps/docs/content/docs/orm/prisma-client/testing/unit-testing.mdx

./apps/docs/content/docs/orm/prisma-schema/overview/generators.mdx


Full Statistics Table
Status Count
✅ Successful 2975
🔀 Redirected 0
👻 Excluded 664
🚫 Errors 19
⛔ Unsupported 2
⏳ Timeouts 0
❓ Unknown 0

Copy link
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 the current code and only fix it if needed.

Inline comments:
In
`@apps/docs/content/docs/orm/prisma-client/setup-and-configuration/introduction.mdx`:
- Around line 97-108: The MariaDB example currently hardcodes
host/user/database; update the PrismaMariaDb initialization to accept a
connection string from an environment variable instead (mirror the PostgreSQL
pattern), e.g. construct the adapter using process.env.DATABASE_URL or a
dedicated MYSQL_DATABASE_URL and pass that string into new PrismaMariaDb(...) so
the exported prisma = new PrismaClient({ adapter }) uses env-configured
credentials rather than hardcoded values; change the example to reference
process.env and keep the adapter/PrismaClient symbols as-is.

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 17, 2026
Copy link
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

🧹 Nitpick comments (2)
apps/docs/content/docs/guides/runtimes/deno.mdx (2)

109-124: Clarify the relationship between Prisma Postgres and the direct connection string.

The guide title and description (Line 3) say "Prisma Postgres," step 2.1 uses --db to create a Prisma Postgres database, but then step 2.3 immediately switches to a direct connection string with adapter-pg. A newcomer might not understand why the initially generated DATABASE_URL is being replaced. A sentence or two explaining that the driver adapter requires a direct TCP connection (rather than the Prisma Postgres proxy URL) would smooth over this transition.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/guides/runtimes/deno.mdx` around lines 109 - 124, Add
a brief clarifying sentence in the "2.3. Configure environment variables for
direct connection" section explaining that the Prisma Postgres project dashboard
provides a proxy-style DATABASE_URL by default but the adapter-pg driver
requires a direct TCP connection string, so you must replace the generated
DATABASE_URL with the direct connection string (the one starting with
postgres://) before using adapter-pg; reference DATABASE_URL, adapter-pg, and
"direct connection string" so readers understand why the replacement is
necessary.

174-185: Duplicated adapter/client setup between db.ts and seed.ts.

The adapter + PrismaClient instantiation is copy-pasted in seed.ts (Lines 192-201) instead of importing from db.ts. For a tutorial this is understandable since seed scripts run in a different context, but it's worth adding a brief note explaining why the setup is duplicated — otherwise readers may wonder why you don't just import { prisma } from "../db.ts".

Also applies to: 191-201

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/guides/runtimes/deno.mdx` around lines 174 - 185, The
guide currently shows duplicated adapter and PrismaClient setup in db.ts and
seed.ts (PrismaPg, PrismaClient, prisma); update the docs to either import
prisma from db.ts in seed.ts when possible or—if seed runs in a different Deno
runtime/context—add a brief explanatory note next to the seed.ts snippet
explaining why the adapter + PrismaClient instantiation is duplicated (e.g.,
seed scripts run in a separate process/environment so you cannot import
../db.ts), referencing the symbols PrismaPg, PrismaClient, and prisma so readers
understand the duplication is intentional.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs/content/docs/guides/runtimes/deno.mdx`:
- Around line 1-5: The frontmatter in deno.mdx is missing required SEO fields;
add metaTitle and metaDescription to the existing frontmatter block (alongside
title/description/url) so they mirror sibling guides like bun.mdx — set
metaTitle to a concise page title (e.g., "Deno — Prisma ORM with Postgres") and
metaDescription to a short summary of the guide (e.g., "Learn how to use Prisma
ORM in a Deno application with Prisma Postgres"), ensuring keys are spelled
exactly as metaTitle and metaDescription.

---

Nitpick comments:
In `@apps/docs/content/docs/guides/runtimes/deno.mdx`:
- Around line 109-124: Add a brief clarifying sentence in the "2.3. Configure
environment variables for direct connection" section explaining that the Prisma
Postgres project dashboard provides a proxy-style DATABASE_URL by default but
the adapter-pg driver requires a direct TCP connection string, so you must
replace the generated DATABASE_URL with the direct connection string (the one
starting with postgres://) before using adapter-pg; reference DATABASE_URL,
adapter-pg, and "direct connection string" so readers understand why the
replacement is necessary.
- Around line 174-185: The guide currently shows duplicated adapter and
PrismaClient setup in db.ts and seed.ts (PrismaPg, PrismaClient, prisma); update
the docs to either import prisma from db.ts in seed.ts when possible or—if seed
runs in a different Deno runtime/context—add a brief explanatory note next to
the seed.ts snippet explaining why the adapter + PrismaClient instantiation is
duplicated (e.g., seed scripts run in a separate process/environment so you
cannot import ../db.ts), referencing the symbols PrismaPg, PrismaClient, and
prisma so readers understand the duplication is intentional.

Comment on lines 1 to 5
---
title: Deno
description: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
url: /guides/runtimes/deno
---
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check frontmatter in sibling mdx files to understand the expected pattern
cd apps/docs/content/docs/guides/runtimes/
ls -la *.mdx 2>/dev/null | head -20
echo "---"
echo "Sample frontmatter from first 3 files:"
for file in *.mdx; do
  echo "=== $file ==="
  head -10 "$file"
done

Repository: prisma/web

Length of output: 1086


Add missing metaTitle and metaDescription to the frontmatter.

The deno.mdx file is missing required frontmatter fields that are present in sibling guides like bun.mdx. These fields are used for SEO and link metadata. Here's what needs to be added:

Fix
 ---
 title: Deno
+metaTitle: How to use Prisma ORM and Prisma Postgres with Deno
 description: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
+metaDescription: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
 url: /guides/runtimes/deno
 ---
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
---
title: Deno
description: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
url: /guides/runtimes/deno
---
---
title: Deno
metaTitle: How to use Prisma ORM and Prisma Postgres with Deno
description: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
metaDescription: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
url: /guides/runtimes/deno
---
🧰 Tools
🪛 GitHub Actions: Links

[error] 1-1: lint:links failed due to invalid frontmatter in deno.mdx. metaTitle and metaDescription must be strings; received undefined.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/guides/runtimes/deno.mdx` around lines 1 - 5, The
frontmatter in deno.mdx is missing required SEO fields; add metaTitle and
metaDescription to the existing frontmatter block (alongside
title/description/url) so they mirror sibling guides like bun.mdx — set
metaTitle to a concise page title (e.g., "Deno — Prisma ORM with Postgres") and
metaDescription to a short summary of the guide (e.g., "Learn how to use Prisma
ORM in a Deno application with Prisma Postgres"), ensuring keys are spelled
exactly as metaTitle and metaDescription.

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.

1 participant