© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•10mo ago•
2 replies
vanHessler

Drizzle-kit incorrectly defaulting to @neondatabase/serverless driver

Hello, initially set up drizzle.config.ts and did a drizzle-kit generate and migrate and that worked.
Now when I attempt to run a generate and migrate, the migrate fails, saying it can't open a websocket to the neon database.
I am hosting pg in docker locally, my database url is such:
DATABASE_URL=postgres://<user>:<password>@localhost:5432/drizzle-db
DATABASE_URL=postgres://<user>:<password>@localhost:5432/drizzle-db


Using '@neondatabase/serverless' driver for database querying
 Warning  '@neondatabase/serverless' can only connect to remote Neon/Vercel Postgres/Supabase instances through a websocket
Using '@neondatabase/serverless' driver for database querying
 Warning  '@neondatabase/serverless' can only connect to remote Neon/Vercel Postgres/Supabase instances through a websocket


My Drizzle config is such:
import { loadEnvConfig } from "@next/env";
import { defineConfig } from "drizzle-kit";
loadEnvConfig(process.cwd());

export default defineConfig({
    out: "./drizzle",
    schema: "./db/schema.ts",
    dialect: "postgresql",
    dbCredentials: {
        url: process.env.DATABASE_URL!,
    },
});
import { loadEnvConfig } from "@next/env";
import { defineConfig } from "drizzle-kit";
loadEnvConfig(process.cwd());

export default defineConfig({
    out: "./drizzle",
    schema: "./db/schema.ts",
    dialect: "postgresql",
    dbCredentials: {
        url: process.env.DATABASE_URL!,
    },
});

(using nextjs - if i console log the process.env.DATABASE_URL, it is correct according to the database url i pasted above)

Drizzle-orm works just fine in the actual app, connecting the database . I'm not sure why it is defaulting now to neon in drizzle-kit migrate? Maybe my package got updated and that is just a default setting now? Am i missing something in the config??
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Drizzle Kit Generate renames columns incorrectly
Drizzle TeamDTDrizzle Team / help
14mo ago
Migration defaulting to neon driver
Drizzle TeamDTDrizzle Team / help
12mo ago
How to get drizzle-kit to connect to local supabase via websockets with neondatabase/serverless to
Drizzle TeamDTDrizzle Team / help
12mo ago
drizzle-kit defineConfig no "pg" driver available.
Drizzle TeamDTDrizzle Team / help
2y ago