We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7d015f commit 69cd6c1Copy full SHA for 69cd6c1
1 file changed
prisma.config.ts
@@ -1,10 +1,14 @@
1
import { config } from 'dotenv';
2
-import { defineConfig, env } from 'prisma/config';
+import { defineConfig } from 'prisma/config';
3
4
// Load .env.local first, fall back to .env
5
config({ path: '.env.local' });
6
config({ path: '.env' });
7
8
+// Use placeholder during build (prisma generate doesn't need real DB connection)
9
+// Real DATABASE_URL is required at runtime for migrations and queries
10
+const databaseUrl = process.env.DATABASE_URL || 'postgresql://placeholder:placeholder@localhost:5432/placeholder';
11
+
12
export default defineConfig({
13
earlyAccess: true,
14
schema: './prisma/schema.prisma',
@@ -17,6 +21,6 @@ export default defineConfig({
17
21
},
18
22
19
23
datasource: {
20
- url: env('DATABASE_URL'),
24
+ url: databaseUrl,
25
26
});
0 commit comments