Skip to content

Commit

Permalink
skip validation in drizzle config
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciabad committed Oct 24, 2023
1 parent fabaf6a commit ea1b398
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drizzle.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import path from 'node:path'
dotenv.config({ path: path.resolve(process.cwd(), '.env.local') })
dotenv.config({ path: path.resolve(process.cwd(), '.env') })

if (process.env.USE_LOCAL_DB !== 'true') {
if (
process.env.USE_LOCAL_DB !== 'true' &&
process.env.SKIP_ENV_VALIDATION !== 'true'
) {
if (
!process.env.DATABASE_HOST ||
!process.env.DATABASE_USERNAME ||
Expand All @@ -15,6 +18,7 @@ if (process.env.USE_LOCAL_DB !== 'true') {
throw new Error('Missing environment variables for database')
}
}

export default {
schema: './src/server/db/schema/*',
out: './drizzle',
Expand Down

0 comments on commit ea1b398

Please sign in to comment.