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 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -73,7 +73,10 @@ function parseScore(score: RawScore | undefined) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function run() {
|
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)
|
const db = drizzle(client)
|
||||||
|
|
||||||
console.log('Creating tables...')
|
console.log('Creating tables...')
|
||||||
|
|||||||
Reference in New Issue
Block a user