Skip to content

Conversation

@muhad-bk
Copy link

What?

Enable BunSQL-based Postgres connections when Payload is running in Bun.


Why?

Drizzle uses BunSQL for Postgres on Bun, which is more performant and the recommended driver. Payload currently assumes Node.js SQL drivers, causing incompatibility in Bun environments.


How?

  • Detect Bun runtime
  • Use BunSQL for Postgres connections via Drizzle when running in Bun
  • Leave Node.js SQL behavior unchanged

Before / After

Before: Postgres + Drizzle fails in Bun
After: Postgres works via BunSQL in Bun


Fixes #

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant