From 2b22f504cf4c3cf685a7659b63d9800aa2bd8160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 14 Jun 2026 16:43:50 +0200 Subject: [PATCH] fix: pass DB_PASSWORD to postgres client in sync script The sync script created its own postgres client and only read DATABASE_URL, bypassing the DB_PASSWORD override that lib/db/index.ts already applied. Since DATABASE_URL has no password embedded, auth always failed. Co-Authored-By: Claude Sonnet 4.6 --- scripts/sync.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/sync.ts b/scripts/sync.ts index cbaeb19..7edb87e 100644 --- a/scripts/sync.ts +++ b/scripts/sync.ts @@ -73,7 +73,10 @@ function parseScore(score: RawScore | undefined) { } async function run() { - const client = postgres(DATABASE_URL, { max: 5 }) + const client = postgres(DATABASE_URL, { + max: 5, + ...(process.env.DB_PASSWORD ? { password: process.env.DB_PASSWORD } : {}), + }) const db = drizzle(client) console.log('Creating tables...')