Skip to content

fix(api): import bounties into the server's configured database - #30

Merged
debba merged 1 commit into
mainfrom
fix/import-bounties-config
Oct 13, 2026
Merged

debba merged 1 commit into
mainfrom
fix/import-bounties-config

Conversation

@debba

@debba debba commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

The import:bounties script from #29 connected to DATABASE_URL. The server connects to database.url from the instance config.json (apps/api/src/index.ts:196). On the production pod DATABASE_URL points to /data/registry.db, so the import could have seeded the wrong database.

  • The script now loads the same config as the server and falls back to DATABASE_URL only when the instance has no config.
  • It prints which database it uses.
  • --dry-run now reports the counts it would apply.
  • Docs updated.

Tested against a temporary instance whose config.json points to one SQLite file while DATABASE_URL points to a non-existent one. The script used the config.json database: the dry run reported 31 created, then the real run created 31.

The importer connected to DATABASE_URL, but the server connects to
database.url from the instance config.json, so on an installed instance
it could seed a different (stale) database. Use the same config, falling
back to DATABASE_URL, print which database it uses, and report would-be
counts on --dry-run.
@debba debba self-assigned this Oct 13, 2026
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tabularium-docs Ready Ready Preview Oct 13, 2026 8:40pm UTC
tabularium-website Ready Ready Preview Oct 13, 2026 8:40pm UTC

Request Review

@debba
debba merged commit 82a41ec into main Oct 13, 2026
11 checks passed

This branch was successfully deployed

2 active deployments
Preview – tabularium-docs — fc5f4dee Deployed Oct 13, 2026 by vercel[bot]
Preview – tabularium-website — fc5f4dee Deployed Oct 13, 2026 by vercel[bot]
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