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

20 lines
528 B
TypeScript
Raw Normal View History

2025-06-22 13:07:02 +02:00
import type { Config } from "drizzle-kit";
import * as dotenv from "dotenv";
// Load the right env file based on environment
2025-07-16 15:34:55 +02:00
if (process.env.NODE_ENV === "production") {
2025-06-22 13:07:02 +02:00
dotenv.config({ path: ".env.production" });
} else {
dotenv.config({ path: ".env.local" });
}
export default {
schema: "../../packages/db/src/schema.ts",
2025-06-22 13:07:02 +02:00
dialect: "postgresql",
dbCredentials: {
2025-07-16 15:34:55 +02:00
url: process.env.DATABASE_URL!,
2025-06-22 13:07:02 +02:00
},
out: "./migrations",
2025-07-16 15:34:55 +02:00
strict: process.env.NODE_ENV === "production",
2025-06-22 13:07:02 +02:00
} satisfies Config;