diff --git a/bun.lockb b/bun.lockb index a0e0f5a..51d5c15 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/dockerzip b/dockerzip index 176c94c..2d48f58 100644 Binary files a/dockerzip and b/dockerzip differ diff --git a/pkgs/api/_deploy.ts b/pkgs/api/_deploy.ts index c5d2b10..5ee63dc 100644 --- a/pkgs/api/_deploy.ts +++ b/pkgs/api/_deploy.ts @@ -71,6 +71,7 @@ DATABASE_URL="${action.url}" return "ok"; case "db-pull": { + await $({ cwd: dir("app/db") })`bun install`; await $({ cwd: dir("app/db") })`bun prisma db pull`; await $({ cwd: dir("app/db") })`bun prisma generate`; res.send("ok"); diff --git a/pkgs/utils/prisma.ts b/pkgs/utils/prisma.ts index 6407efe..588f116 100644 --- a/pkgs/utils/prisma.ts +++ b/pkgs/utils/prisma.ts @@ -6,6 +6,8 @@ import { g } from "./global"; export const preparePrisma = async () => { if (await existsAsync(dir("app/db/.env"))) { if (!(await existsAsync(dir("node_modules/.prisma")))) { + await $({ cwd: dir(`app/db`) })`bun install`; + await $({ cwd: dir(`app/db`) })`bun prisma db pull`; await $({ cwd: dir(`app/db`) })`bun prisma generate`; } const { PrismaClient } = await import("../../app/db/db"); diff --git a/pkgs/zip/dbzip b/pkgs/zip/dbzip index f7b4b18..0e04d49 100644 Binary files a/pkgs/zip/dbzip and b/pkgs/zip/dbzip differ