// Load .env file for local development (silently skip if not available)
try {
  const dotenv = await import('dotenv')
  dotenv.config()
} catch {
  // dotenv not available (e.g., in Docker) - env vars passed directly
}

// 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',
  migrations: {
    path: 'prisma/migrations',
  },
  datasource: {
    url: databaseUrl,
  },
}
