Files
imen_pishghaman/apps/api/prisma.config.ts
T

18 lines
544 B
TypeScript
Raw Normal View History

import { existsSync } from "node:fs";
import { defineConfig } from "prisma/config";
// Prisma 7 no longer loads .env on its own
if (existsSync(".env")) process.loadEnvFile(".env");
export default defineConfig({
schema: "prisma/schema.prisma",
migrations: {
path: "prisma/migrations",
seed: "tsx src/seed/seed.ts",
},
datasource: {
// `prisma generate` (e.g. in the Docker build) does not need a real database
url: process.env.DATABASE_URL ?? "postgresql://placeholder:placeholder@localhost:5432/placeholder",
},
});