Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
Web-CoreX
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hendrik Garske
Web-CoreX
Commits
0220b858
Commit
0220b858
authored
Dec 27, 2025
by
Hendrik Garske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Prisma Client Initialisierung mit datasourceUrl für Prisma 7
parent
3135af5b
Pipeline
#8
failed with stages
in 27 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
prisma.ts
lib/prisma.ts
+8
-3
No files found.
lib/prisma.ts
View file @
0220b858
...
...
@@ -4,9 +4,14 @@ const globalForPrisma = globalThis as unknown as {
prisma
:
PrismaClient
|
undefined
}
export
const
prisma
=
globalForPrisma
.
prisma
??
new
PrismaClient
({
const
createPrismaClient
=
()
=>
{
return
new
PrismaClient
({
datasourceUrl
:
process
.
env
.
DATABASE_URL
,
log
:
process
.
env
.
NODE_ENV
===
'development'
?
[
'query'
,
'error'
,
'warn'
]
:
[
'error'
],
})
})
}
export
const
prisma
=
globalForPrisma
.
prisma
??
createPrismaClient
()
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
globalForPrisma
.
prisma
=
prisma
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment