Skip to content

Commit 91960da

Browse files
committed
fix: Stop generating the Prisma schema in prod
1 parent 220e767 commit 91960da

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

prisma/index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,16 @@ const config = {
206206
"config": {
207207
"engineType": "library"
208208
},
209-
"binaryTargets": [],
209+
"binaryTargets": [
210+
{
211+
"fromEnvVar": null,
212+
"value": "windows"
213+
},
214+
{
215+
"fromEnvVar": null,
216+
"value": "debian-openssl-3.0.x"
217+
}
218+
],
210219
"previewFeatures": [],
211220
"isCustomOutput": true
212221
},
@@ -242,5 +251,8 @@ Object.assign(exports, Prisma)
242251

243252
path.join(__dirname, "query_engine-windows.dll.node");
244253
path.join(process.cwd(), "..\\prisma\\query_engine-windows.dll.node")
254+
255+
path.join(__dirname, "libquery_engine-debian-openssl-3.0.x.so.node");
256+
path.join(process.cwd(), "..\\prisma\\libquery_engine-debian-openssl-3.0.x.so.node")
245257
path.join(__dirname, "schema.prisma");
246258
path.join(process.cwd(), "..\\prisma\\schema.prisma")
Binary file not shown.

prisma/schema.prisma

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
generator client {
55
provider = "prisma-client-js"
66
output = "../../prisma"
7+
binaryTargets = ["native", "debian-openssl-3.0.x"]
78
}
89

910
datasource db {

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"start": "node ./lib/server.js",
1212
"start:watch": "tsc-watch --build ./tsconfig.json --onSuccess \"node ./lib/server.js\"",
1313
"db:sync:dev": "prisma migrate dev",
14-
"db:sync:prod": "prisma generate && prisma migrate deploy",
14+
"db:sync:prod": "prisma migrate deploy",
1515
"db:seed": "prisma db seed"
1616
},
1717
"prisma": {

server/prisma/schema.prisma

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
generator client {
55
provider = "prisma-client-js"
66
output = "../../prisma"
7+
binaryTargets = ["native", "debian-openssl-3.0.x"]
78
}
89

910
datasource db {

0 commit comments

Comments
 (0)