From 92acf8b7544133053b41e5a1473ebc58a3b04e76 Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Fri, 5 Jun 2026 13:42:21 +0100 Subject: [PATCH] fix(database): include the Prisma CLI in production builds prisma was a devDependency of @trigger.dev/database. It had been landing in the pruned production install only as a side effect of pnpm auto-installing it as a peer of @prisma/client; a recent dependency change shifted peer resolution so it stopped being materialized into the production tree, and the container entrypoint and migration task could no longer find the prisma binary. Moving prisma to dependencies makes the CLI an explicit part of production installs. It lands in the webapp image only: the separately deployed supervisor, coordinator, and provider images do not reach the database package in their production trees, so they are unaffected. --- .server-changes/include-prisma-cli-in-prod-image.md | 6 ++++++ internal-packages/database/package.json | 4 ++-- pnpm-lock.yaml | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 .server-changes/include-prisma-cli-in-prod-image.md diff --git a/.server-changes/include-prisma-cli-in-prod-image.md b/.server-changes/include-prisma-cli-in-prod-image.md new file mode 100644 index 00000000000..888544239fe --- /dev/null +++ b/.server-changes/include-prisma-cli-in-prod-image.md @@ -0,0 +1,6 @@ +--- +area: webapp +type: fix +--- + +Fix database migrations failing to run in the production image because the Prisma CLI was missing from the build. diff --git a/internal-packages/database/package.json b/internal-packages/database/package.json index cd9b40db95d..b8e530908e2 100644 --- a/internal-packages/database/package.json +++ b/internal-packages/database/package.json @@ -6,11 +6,11 @@ "types": "./dist/index.d.ts", "dependencies": { "@prisma/client": "6.14.0", - "decimal.js": "^10.6.0" + "decimal.js": "^10.6.0", + "prisma": "6.14.0" }, "devDependencies": { "@types/decimal.js": "^7.4.3", - "prisma": "6.14.0", "rimraf": "6.0.1" }, "scripts": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1efd8dea94f..8ad0e07e650 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1133,13 +1133,13 @@ importers: decimal.js: specifier: ^10.6.0 version: 10.6.0 + prisma: + specifier: 6.14.0 + version: 6.14.0(magicast@0.3.5)(typescript@5.5.4) devDependencies: '@types/decimal.js': specifier: ^7.4.3 version: 7.4.3 - prisma: - specifier: 6.14.0 - version: 6.14.0(magicast@0.3.5)(typescript@5.5.4) rimraf: specifier: 6.0.1 version: 6.0.1