This commit is contained in:
Rizky
2024-01-25 13:43:36 +07:00
parent 6959145d00
commit b85c5cc48d
5 changed files with 3 additions and 0 deletions
+2
View File
@@ -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");