Open Perdolique opened 2 weeks ago
In the changelog for drizzle-kit v0.21 it is specified in which order the drivers are searched for: https://github.com/drizzle-team/drizzle-kit-mirror/releases/tag/v0.21.0
So seems you just need to install pg
package or postgres
as a dev dependency and it should start using that automatically.
In case both are installed, neon-serverless
will be ignored according to this hidden logic. So installing pg
or postgres
produces another set of problems because these packages have precedence over neon-serverless
.
It would be nice to avoid somehow this opinionated order logic. By defining the specific driver/config for different cases, even locally.
In my case, I have Postgres installed in the Docker locally that I need to have access to directly and Neon database in the cloud that I need to have access to from my local machine also (but not limited by these two cases). So both drivers will be installed in this case, but drizzle-kit
doesn't cover such cases at the moment.
I'm trying to run migration locally, but
drizzle-kit migrate
usesneon-serverless
even if it's not defined anywhere. I have a local postgresql database with no web socket connections or neon-related stuff. Is it possible to usepg
or so locally, butneon-serverless
in production? Or define customwsProxy
in the local environment during migration?