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

24 lines
560 B
TypeScript
Raw Normal View History

2025-07-24 14:41:34 -07:00
import type { Config } from "drizzle-kit";
import * as dotenv from "dotenv";
2026-01-31 00:20:04 +01:00
import { webEnv } from "@opencut/env/web";
2025-07-24 14:41:34 -07:00
// Load the right env file based on environment
2026-01-31 00:20:04 +01:00
if (webEnv.NODE_ENV === "production") {
dotenv.config({ path: ".env.production" });
2025-07-24 14:41:34 -07:00
} else {
dotenv.config({ path: ".env.local" });
2025-07-24 14:41:34 -07:00
}
export default {
schema: "./src/schema.ts",
dialect: "postgresql",
migrations: {
table: "drizzle_migrations",
},
dbCredentials: {
url: webEnv.DATABASE_URL,
},
out: "./migrations",
strict: webEnv.NODE_ENV === "production",
2025-07-24 14:41:34 -07:00
} satisfies Config;