Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ import { PrismaMariaDb } from "@prisma/adapter-mariadb";
import { PrismaClient } from "../generated/prisma/client";

const adapter = new PrismaMariaDb({
host: process.env.DATABASE_HOST,
user: process.env.DATABASE_USER,
password: process.env.DATABASE_PASSWORD,
database: process.env.DATABASE_NAME,
host: process.env.DATABASE_HOST!,
user: process.env.DATABASE_USER!,
password: process.env.DATABASE_PASSWORD!,
database: process.env.DATABASE_NAME!,
Comment on lines +206 to +209
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if the add-to-existing-project guide has the same pattern

# Search for PrismaMariaDb configuration in the add-to-existing-project guide
rg -A 10 'new PrismaMariaDb\(' apps/docs/content/docs/\(index\)/prisma-orm/add-to-existing-project/mysql.mdx

Repository: prisma/web

Length of output: 340


Align env var non-null assertions across the MySQL Prisma docs examples

In quickstart/mysql.mdx, the PrismaMariaDb adapter uses process.env.DATABASE_HOST!/! for the env vars, but the corresponding example in add-to-existing-project/mysql.mdx uses process.env.DATABASE_HOST (no !). Update one side so both guides present the same TypeScript pattern.

🤖 Prompt for 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.

In `@apps/docs/content/docs/`(index)/prisma-orm/quickstart/mysql.mdx around lines
206 - 209, The quickstart MySQL example uses non-null assertions like
process.env.DATABASE_HOST!, process.env.DATABASE_USER!,
process.env.DATABASE_PASSWORD!, process.env.DATABASE_NAME! while the other guide
omits the `!`; make them consistent by removing the trailing `!` in the
quickstart example (adjust the PrismaMariaDb adapter config values to use
process.env.DATABASE_HOST, process.env.DATABASE_USER,
process.env.DATABASE_PASSWORD, process.env.DATABASE_NAME without the non-null
assertion).

connectionLimit: 5,
});
const prisma = new PrismaClient({ adapter });
Expand Down