diff --git a/bun.lockb b/bun.lockb index 9b96997..ca7bc9c 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/dockerzip b/dockerzip index 6445230..60ee6de 100644 Binary files a/dockerzip and b/dockerzip differ diff --git a/pkgs/api/_deploy.ts b/pkgs/api/_deploy.ts index 5ee63dc..2b67d28 100644 --- a/pkgs/api/_deploy.ts +++ b/pkgs/api/_deploy.ts @@ -1,6 +1,6 @@ import { $ } from "execa"; import * as fs from "fs"; -import { dirAsync, removeAsync } from "fs-jetpack"; +import { dirAsync, removeAsync, writeAsync } from "fs-jetpack"; import { apiContext } from "service-srv"; import { dir } from "utils/dir"; import { g } from "utils/global"; @@ -71,6 +71,18 @@ DATABASE_URL="${action.url}" return "ok"; case "db-pull": { + await writeAsync( + dir("app/db/prisma/schema.prisma"), + `\ +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +}` + ); await $({ cwd: dir("app/db") })`bun install`; await $({ cwd: dir("app/db") })`bun prisma db pull`; await $({ cwd: dir("app/db") })`bun prisma generate`; diff --git a/pkgs/zip/dbzip b/pkgs/zip/dbzip index 640d5da..331e504 100644 Binary files a/pkgs/zip/dbzip and b/pkgs/zip/dbzip differ