Skip to content

fix(scripts): initialize database pool in backfill-primary-brand-domain#4163

Merged
bokelley merged 1 commit into
mainfrom
bokelley/backfill-script-init-db
May 6, 2026
Merged

fix(scripts): initialize database pool in backfill-primary-brand-domain#4163
bokelley merged 1 commit into
mainfrom
bokelley/backfill-script-init-db

Conversation

@bokelley

@bokelley bokelley commented May 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Tiny fix — call `initializeDatabase(getDatabaseConfig())` before `getPool()`, matching the convention of other prod-runnable scripts in `server/src/scripts/` (`generate-perspective-heroes.ts`, `backfill-member-announcements.ts`, `backfill-invite-events.ts`).

Caught when running the script via `fly ssh` post-deploy of #4161 — script crashed with `Database not initialized`.

Test plan

🤖 Generated with Claude Code

Other prod-runnable scripts in server/src/scripts/ call
initializeDatabase(getDatabaseConfig()) before getPool(); this one was
missing it and crashed on first run. Closes the loop on PR #4161.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley
bokelley force-pushed the bokelley/backfill-script-init-db branch from 94591e7 to 06dae09 Compare May 6, 2026 16:42
@bokelley
bokelley merged commit ab4227a into main May 6, 2026
12 checks passed
@bokelley
bokelley deleted the bokelley/backfill-script-init-db branch May 6, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant