diff options
| author | Maze <167211895+mazeincoding@users.noreply.github.com> | 2026-01-31 00:20:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-31 00:20:04 +0100 |
| commit | 7bf0984698e43b9aa2dd879f65951318ed410390 (patch) | |
| tree | ccf2cd590a47d550152afc07129cb55c71a9ec35 /apps/web/drizzle.config.ts | |
| parent | 0173db99448d1c4c6415dcf15272e17551b48b04 (diff) | |
| download | opencut-7bf0984698e43b9aa2dd879f65951318ed410390.tar.gz | |
codebase overhaul (#697)
Diffstat (limited to 'apps/web/drizzle.config.ts')
| -rw-r--r-- | apps/web/drizzle.config.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/web/drizzle.config.ts b/apps/web/drizzle.config.ts index a0602a74..2d53d6b9 100644 --- a/apps/web/drizzle.config.ts +++ b/apps/web/drizzle.config.ts @@ -1,19 +1,23 @@ import type { Config } from "drizzle-kit"; import * as dotenv from "dotenv"; +import { webEnv } from "@opencut/env/web"; // Load the right env file based on environment -if (process.env.NODE_ENV === "production") { +if (webEnv.NODE_ENV === "production") { dotenv.config({ path: ".env.production" }); } else { dotenv.config({ path: ".env.local" }); } export default { - schema: "../../packages/db/src/schema.ts", + schema: "./src/schema.ts", dialect: "postgresql", + migrations: { + table: "drizzle_migrations", + }, dbCredentials: { - url: process.env.DATABASE_URL!, + url: webEnv.DATABASE_URL, }, out: "./migrations", - strict: process.env.NODE_ENV === "production", + strict: webEnv.NODE_ENV === "production", } satisfies Config; |
