Skip to content

init: default db:generate to --pglite#24

Open
js360000 wants to merge 1 commit into
seveibar:mainfrom
js360000:bountybox/issue-2
Open

init: default db:generate to --pglite#24
js360000 wants to merge 1 commit into
seveibar:mainfrom
js360000:bountybox/issue-2

Conversation

@js360000
Copy link
Copy Markdown

Summary

init: default db:generate to --pglite

Scaffolded db:generate previously ran 'pgstrap generate', which requires
a running Postgres instance. Running 'bun run db:generate' on a fresh
project would fail with a connection error.

Default to '--pglite' so type generation works out of the box against an
in-memory PGlite instance. Users who need to generate against a real
Postgres (e.g. via DATABASE_URL) can drop the flag from the scaffolded
script.

  • src/init.ts: scaffold db:generate with --pglite
  • tests/init.test.ts: assert the new default and add a regression test
  • README.md: document the new default

Diff

 README.md          |  2 +-
 src/init.ts        |  5 ++++-
 tests/init.test.ts | 12 +++++++++++-
 3 files changed, 16 insertions(+), 3 deletions(-)

Claim

/claim #2

Fixes seveibar#2

Scaffolded db:generate previously ran 'pgstrap generate', which requires
a running Postgres instance. Running 'bun run db:generate' on a fresh
project would fail with a connection error.

Default to '--pglite' so type generation works out of the box against an
in-memory PGlite instance. Users who need to generate against a real
Postgres (e.g. via DATABASE_URL) can drop the flag from the scaffolded
script.

- src/init.ts: scaffold db:generate with --pglite
- tests/init.test.ts: assert the new default and add a regression test
- README.md: document the new default

/claim seveibar#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.

2 participants