Skip to content

Use PGlite for generated db:generate#22

Open
TBSKR wants to merge 1 commit into
seveibar:mainfrom
TBSKR:codex/pglite-db-generate-safe
Open

Use PGlite for generated db:generate#22
TBSKR wants to merge 1 commit into
seveibar:mainfrom
TBSKR:codex/pglite-db-generate-safe

Conversation

@TBSKR
Copy link
Copy Markdown

@TBSKR TBSKR commented May 15, 2026

Fixes #2

@algora-pbc /claim #2

Summary

  • updates the scaffolded db:generate script to run pgstrap generate --pglite, so generated projects can produce types without a background Postgres server
  • keeps direct pgstrap generate behavior pointed at the configured Postgres database for compatibility
  • restores DATABASE_URL and closes temporary PGlite/gateway resources even when generation fails
  • adds a regression test for the failure cleanup path

Verification

  • npx --yes bun@latest run format:check
  • npx --yes bun@latest test
  • npx --yes bun@latest run build

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.

Use pglite so that postgres isn't required when generating types

1 participant