Fix: Allow prisma generate without DATABASE_URL
Use placeholder URL during build - only real URL needed for migrations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
8157531fba
commit
a71ef8f9fc
|
|
@ -6,11 +6,8 @@ try {
|
|||
// dotenv not available (e.g., in Docker) - env vars passed directly
|
||||
}
|
||||
|
||||
const databaseUrl = process.env.DATABASE_URL
|
||||
|
||||
if (!databaseUrl) {
|
||||
throw new Error('DATABASE_URL environment variable is required')
|
||||
}
|
||||
// DATABASE_URL is optional during build (prisma generate), required for migrations
|
||||
const databaseUrl = process.env.DATABASE_URL || 'postgresql://placeholder:placeholder@localhost:5432/placeholder'
|
||||
|
||||
export default {
|
||||
schema: 'prisma/schema.prisma',
|
||||
|
|
|
|||
Loading…
Reference in New Issue