Drizzle Studio on postgres
While
- drizzle-kit generate:pg
- drizzle-kit push:pg
- drizzle-kit introspect:pg
all work also with the postgres driver ... (driver: 'pg' in drizzle.config.ts)
- drizzle-kit studio does not and needs additionally the pg package (node-postgres) installed as dependency.
Is that something I should open an issue for on github ?
6 Replies
I had the same problem the other day and thought about opening an Issue with PR too 😉
That seem to be a design choice by the drizzle team. You can probably get away with installing node-postgres as a dev dependency
Yes that was my "workaround". But it feels a little inconstistent, as drizzle-kit migrations work with the postgres driver.
It is a little confusing on which driver to use (postgres vs. pg).
Also I guess there might be similar problems with other drivers lik @Neon/database/serverless @vercel/postgres etc. - haven't tried them yet. If there is no rather easy fix for that I don't think it is worth fixing.
I'm using
@vercel/postgres
it works btw
using the pg
driver but you need to add ?sslmode=require
to the Vercel URLinteresting and a little weird at the same time
oh you still have the pg driver in your dependencies ... I see