fix issue

This commit is contained in:
Maze Winther
2025-07-16 15:34:55 +02:00
parent 9530058b97
commit 700366f61e
+3 -4
View File
@@ -1,9 +1,8 @@
import type { Config } from "drizzle-kit"; import type { Config } from "drizzle-kit";
import * as dotenv from "dotenv"; import * as dotenv from "dotenv";
import { env } from "@/env";
// Load the right env file based on environment // Load the right env file based on environment
if (env.NODE_ENV === "production") { if (process.env.NODE_ENV === "production") {
dotenv.config({ path: ".env.production" }); dotenv.config({ path: ".env.production" });
} else { } else {
dotenv.config({ path: ".env.local" }); dotenv.config({ path: ".env.local" });
@@ -13,8 +12,8 @@ export default {
schema: "../../packages/db/src/schema.ts", schema: "../../packages/db/src/schema.ts",
dialect: "postgresql", dialect: "postgresql",
dbCredentials: { dbCredentials: {
url: env.DATABASE_URL, url: process.env.DATABASE_URL!,
}, },
out: "./migrations", out: "./migrations",
strict: env.NODE_ENV === "production", strict: process.env.NODE_ENV === "production",
} satisfies Config; } satisfies Config;