From 8bfc059b66753a5cf73b68d5929b2baa6a36b8c0 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Wed, 20 Dec 2023 04:01:04 +0100 Subject: [PATCH] server/utils/database: ensure that database engines exists. --- package-lock.json | 1 + package.json | 1 + server/utils/database.ts | 3 +++ 3 files changed, 5 insertions(+) diff --git a/package-lock.json b/package-lock.json index 0898de5..8a09587 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "hasInstallScript": true, "dependencies": { "@prisma/client": "5.7.0", + "@prisma/engines": "^5.7.0", "@prisma/migrate": "5.7.0" }, "devDependencies": { diff --git a/package.json b/package.json index f91f841..342dac7 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ }, "dependencies": { "@prisma/client": "5.7.0", + "@prisma/engines": "^5.7.0", "@prisma/migrate": "5.7.0" } } diff --git a/server/utils/database.ts b/server/utils/database.ts index 8223437..8ebed0c 100644 --- a/server/utils/database.ts +++ b/server/utils/database.ts @@ -1,9 +1,12 @@ import { PrismaClient, Prisma } from "@prisma/client"; +import * as PrismaEngines from "@prisma/engines"; import { type pageData } from "./baaPageParsing"; type model = PrismaClient[Uncapitalize]; +PrismaEngines.ensureBinariesExist(); + function getBeforeParameters( pageData: pageData, fetchArgs: Prisma.Args,