Commit c99f77ff authored by Hendrik Garske's avatar Hendrik Garske

Fix: Downgrade auf Prisma 6 für Kompatibilität

parent 0220b858
Pipeline #9 failed with stages
in 29 seconds
...@@ -4,14 +4,9 @@ const globalForPrisma = globalThis as unknown as { ...@@ -4,14 +4,9 @@ const globalForPrisma = globalThis as unknown as {
prisma: PrismaClient | undefined prisma: PrismaClient | undefined
} }
const createPrismaClient = () => { export const prisma = globalForPrisma.prisma ?? new PrismaClient({
return new PrismaClient({
datasourceUrl: process.env.DATABASE_URL,
log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error'], 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 if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma
This diff is collapsed.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"lint": "eslint" "lint": "eslint"
}, },
"dependencies": { "dependencies": {
"@prisma/client": "^7.2.0", "@prisma/client": "^6.19.1",
"@radix-ui/react-label": "^2.1.8", "@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-slot": "^1.2.4", "@radix-ui/react-slot": "^1.2.4",
"class-variance-authority": "^0.7.1", "class-variance-authority": "^0.7.1",
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"lucide-react": "^0.562.0", "lucide-react": "^0.562.0",
"next": "16.1.1", "next": "16.1.1",
"next-themes": "^0.4.6", "next-themes": "^0.4.6",
"prisma": "^7.2.0", "prisma": "^6.19.1",
"react": "19.2.3", "react": "19.2.3",
"react-dom": "19.2.3", "react-dom": "19.2.3",
"tailwind-merge": "^3.4.0", "tailwind-merge": "^3.4.0",
......
...@@ -7,6 +7,7 @@ generator client { ...@@ -7,6 +7,7 @@ generator client {
datasource db { datasource db {
provider = "postgresql" provider = "postgresql"
url = env("DATABASE_URL")
} }
model User { model User {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment