Can't push migrations to Neon from a deno project (DNS error?)
I'm trying to push some migrations to a Neon database.
Config for reference:
Running
deno run --env -A --node-modules-dir npm:drizzle-kit generate --config ./db/drizzle.config.ts
works fine and generates migrations. The following also works:
However, trying to actually push the migrations gives me this:
anyone have any idea why this is happening? 😩
btw, I have tried both the pooled and non-pooled connection strings.1 Reply
Found the answer, posting in case anyone else runs into this:
drizzle-kit push
and migrate
don't seem to use a driver that is compatible with Neon, so you need to write your own script for applying migrations.
See this article:
https://neon.tech/docs/guides/drizzle-migrations#run-the-migrationNeon
Schema migration with Neon Postgres and Drizzle ORM - Neon Docs
Drizzle is a TypeScript first ORM that connects to all major databases and works across most Javascript runtimes. It provides a simple way to define database schemas and queries in an SQL like dialect...