Skip to content

Run initialized type generation with embedded PGlite - #85

Open
Gaviate wants to merge 3 commits into
seveibar:mainfrom
Gaviate:fix-issue-2-pglite-default
Open

Gaviate wants to merge 3 commits into
seveibar:mainfrom
Gaviate:fix-issue-2-pglite-default

Conversation

@Gaviate

@Gaviate Gaviate commented Oct 4, 2026

Copy link
Copy Markdown

Initialized projects currently run pgstrap generate for db:generate, so the command still connects to external PostgreSQL despite the existing PGlite option. This change makes the generated script use pgstrap generate --pglite; the ordinary CLI defaults and external database workflow stay available.

Adds an integration regression that initializes a project, writes a migration, and executes its actual bun run db:generate script through a bundled CLI. A rejecting local endpoint stands in for the configured external database. The unfixed script attempts one external connection and fails; the repaired script makes zero external connections and generates the expected widget types and SQL. README guidance and the existing initialization expectation are updated.

The existing PGlite adapter submits migration queries one statement at a time. A raw pgm.sql(...) string containing multiple commands must be split into separate calls or run through the external PostgreSQL workflow; this change documents that existing limitation and leaves the adapter unchanged.

Validation on Windows with Bun 1.4.2:

  • bun test: 4 passed, 0 failed.
  • bun run build: passed.
  • bun run format:check: passed.
  • git diff --cached --check: passed.

Fixes #2

@algora-pbc /claim #2

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