Skip to content

Default db:generate to PGlite#25

Open
swhan0329 wants to merge 1 commit into
seveibar:mainfrom
swhan0329:codex/default-generate-pglite
Open

Default db:generate to PGlite#25
swhan0329 wants to merge 1 commit into
seveibar:mainfrom
swhan0329:codex/default-generate-pglite

Conversation

@swhan0329
Copy link
Copy Markdown

@swhan0329 swhan0329 commented May 20, 2026

@algora-pbc /claim #2

Closes #2

Summary

  • makes pgstrap generate default to the existing PGlite path so bun run db:generate and direct generate() calls no longer need a local Postgres server
  • keeps external Postgres generation available via --no-pglite
  • restores DATABASE_URL and closes the temporary PGlite gateway/database in a finally block
  • updates README guidance and regression coverage for the default PGlite path

Verification

  • bun test tests/generate.pglite.test.ts tests/init.test.ts
  • bun test
  • bun run build
  • bun run format:check
  • git diff --check

@swhan0329
Copy link
Copy Markdown
Author

/claim #2

@swhan0329
Copy link
Copy Markdown
Author

@algora-pbc /claim #2

@swhan0329
Copy link
Copy Markdown
Author

Fresh local verification because this PR does not have GitHub checks attached:

  • bun test tests/generate.pglite.test.ts tests/init.test.ts -> 2 tests passed
  • bun test -> 3 tests passed
  • bun run format:check -> passed after tests completed and removed their temporary migration fixture
  • bun run build -> passed
  • git diff --check -> passed

The change remains scoped to making pgstrap generate/scaffolded db:generate use PGlite by default, with --no-pglite preserving the external Postgres opt-out.

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