Files
OpenCut/apps/tools/drizzle.config.ts
T

24 lines
584 B
TypeScript
Raw Normal View History

2025-11-26 08:47:03 +01:00
import type { Config } from "drizzle-kit";
import * as dotenv from "dotenv";
import { toolsEnv } from "@opencut/env/tools";
2025-11-26 08:47:03 +01:00
// Load the right env file based on environment
if (toolsEnv.NODE_ENV === "production") {
2025-11-26 08:47:03 +01:00
dotenv.config({ path: ".env.production" });
} else {
dotenv.config({ path: ".env.local" });
}
export default {
schema: "./src/schema.ts",
dialect: "postgresql",
migrations: {
table: "drizzle_migrations",
},
dbCredentials: {
url: toolsEnv.DATABASE_URL,
2025-11-26 08:47:03 +01:00
},
out: "./migrations",
strict: toolsEnv.NODE_ENV === "production",
2025-11-26 08:47:03 +01:00
} satisfies Config;