Basically when run drizzle-kit migrate it return PostgresError: connection is insecure (try usingsslmode=require)
Issue is 99% because of drizzle.config.ts using some default postgree client instead of neon one.
Only migrate.ts like this works:
import 'dotenv/config'
import { migrate } from 'drizzle-orm/neon-http/migrator' // neon client
import { db } from './connection'
// This will run migrations on the database, skipping the ones already applied
migrate(db, { migrationsFolder: './drizzle' }).then(async () => {})
Expected behavior
all drizzle-kit commands should works as expected, maybe by defining somewhere neon in drizzle.config.ts? If there is such option, please close and sorry for this :)
What version of
drizzle-orm
are you using?"drizzle-orm": "0.34.1",
What version of
drizzle-kit
are you using?"drizzle-kit": "0.25.0"
Describe the Bug
When using migration, it not work for the neon db. This is my
drizzle.config.ts
Basically when run
drizzle-kit migrate
it returnPostgresError: connection is insecure (try using
sslmode=require)
Issue is 99% because ofdrizzle.config.ts
using some default postgree client instead of neon one.Only migrate.ts like this works:
Expected behavior
all
drizzle-kit
commands should works as expected, maybe by defining somewhere neon indrizzle.config.ts
? If there is such option, please close and sorry for this :)Thank you.
Environment & setup
No response