fix issue

This commit is contained in:
Maze Winther 2025-07-16 15:34:55 +02:00
parent 9530058b97
commit 700366f61e
1 changed files with 3 additions and 4 deletions

View File

@ -1,9 +1,8 @@
import type { Config } from "drizzle-kit";
import * as dotenv from "dotenv";
import { env } from "@/env";
// Load the right env file based on environment
if (env.NODE_ENV === "production") {
if (process.env.NODE_ENV === "production") {
dotenv.config({ path: ".env.production" });
} else {
dotenv.config({ path: ".env.local" });
@ -13,8 +12,8 @@ export default {
schema: "../../packages/db/src/schema.ts",
dialect: "postgresql",
dbCredentials: {
url: env.DATABASE_URL,
url: process.env.DATABASE_URL!,
},
out: "./migrations",
strict: env.NODE_ENV === "production",
strict: process.env.NODE_ENV === "production",
} satisfies Config;