fix: Prisma 7 runtime with PrismaPg adapter + pg driver
This commit is contained in:
@@ -53,5 +53,5 @@ jobs:
|
|||||||
docker compose -f /opt/xflow/docker-compose.yml up -d --no-deps --force-recreate xflow
|
docker compose -f /opt/xflow/docker-compose.yml up -d --no-deps --force-recreate xflow
|
||||||
echo "⏳ Waiting for container to start..."
|
echo "⏳ Waiting for container to start..."
|
||||||
sleep 5
|
sleep 5
|
||||||
docker exec xflow sh -c "cd /app && npm install prisma@7.8.0 @prisma/client@7.8.0 && npx prisma generate && export DATABASE_URL=postgresql://xflow:xflow_pass@postgres:5432/xflow && npx prisma migrate deploy --config prisma.config.ts"
|
docker exec xflow sh -c "cd /app && npm install prisma@7.8.0 @prisma/client@7.8.0 @prisma/adapter-pg pg && npx prisma generate && export DATABASE_URL=postgresql://xflow:xflow_pass@postgres:5432/xflow && npx prisma migrate deploy --config prisma.config.ts"
|
||||||
echo "✅ XFlow deployed at $(date)"
|
echo "✅ XFlow deployed at $(date)"
|
||||||
|
|||||||
Vendored
+7
-7
@@ -13,15 +13,15 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "canvas",
|
"type": "canvas",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "xflow-project-ru.canvas",
|
"file": "session-2026-04-23.canvas",
|
||||||
"viewState": {
|
"viewState": {
|
||||||
"x": 680,
|
"x": -30,
|
||||||
"y": 867.4276729559749,
|
"y": 220,
|
||||||
"zoom": -0.8699251927711932
|
"zoom": -1.3211285963682102
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"icon": "lucide-layout-dashboard",
|
"icon": "lucide-layout-dashboard",
|
||||||
"title": "xflow-project-ru"
|
"title": "session-2026-04-23"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -188,6 +188,7 @@
|
|||||||
},
|
},
|
||||||
"active": "3f38aefa8626b1f8",
|
"active": "3f38aefa8626b1f8",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"xflow-project-ru.canvas",
|
||||||
"session-2026-04-23.canvas",
|
"session-2026-04-23.canvas",
|
||||||
"app/server/utils/prisma.ts",
|
"app/server/utils/prisma.ts",
|
||||||
"prisma.config.ts",
|
"prisma.config.ts",
|
||||||
@@ -225,7 +226,6 @@
|
|||||||
"node_modules/svgo/node_modules/commander/Readme.md",
|
"node_modules/svgo/node_modules/commander/Readme.md",
|
||||||
"node_modules/@prisma/streams-local/dist/touch/hash_vendor/NOTICE.md",
|
"node_modules/@prisma/streams-local/dist/touch/hash_vendor/NOTICE.md",
|
||||||
"node_modules/proper-lockfile/node_modules/retry/equation.gif",
|
"node_modules/proper-lockfile/node_modules/retry/equation.gif",
|
||||||
"xflow-project.canvas",
|
"xflow-project.canvas"
|
||||||
"xflow-project-ru.canvas"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,15 @@
|
|||||||
|
import { PrismaPg } from '@prisma/adapter-pg'
|
||||||
|
import { Pool } from 'pg'
|
||||||
import PrismaPkg from '@prisma/client'
|
import PrismaPkg from '@prisma/client'
|
||||||
const { PrismaClient } = PrismaPkg
|
const { PrismaClient } = PrismaPkg
|
||||||
|
|
||||||
|
const pool = new Pool({ connectionString: process.env.DATABASE_URL })
|
||||||
|
const adapter = new PrismaPg(pool)
|
||||||
|
|
||||||
const globalForPrisma = globalThis as unknown as { prisma: InstanceType<typeof PrismaClient> }
|
const globalForPrisma = globalThis as unknown as { prisma: InstanceType<typeof PrismaClient> }
|
||||||
|
|
||||||
export const prisma = globalForPrisma.prisma || new PrismaClient({
|
export const prisma = globalForPrisma.prisma || new PrismaClient({
|
||||||
|
adapter,
|
||||||
log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error']
|
log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error']
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
"jwt-decode": "^4.0.0",
|
"jwt-decode": "^4.0.0",
|
||||||
"markdown-it": "^14.1.0",
|
"markdown-it": "^14.1.0",
|
||||||
"nuxt": "^3.16.0",
|
"nuxt": "^3.16.0",
|
||||||
|
"@prisma/adapter-pg": "^7.8.0",
|
||||||
|
"pg": "^8.12.0",
|
||||||
"vue": "^3.5.0",
|
"vue": "^3.5.0",
|
||||||
"vue-router": "^4.5.0",
|
"vue-router": "^4.5.0",
|
||||||
"zod": "^3.24.0"
|
"zod": "^3.24.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user