Drizzle-kit SSL Error

I've just updated my drizzle-kit to newer version and I'm getting:
$ bun run --cwd packages/db push
$ drizzle-kit push
drizzle-kit: v0.22.1
drizzle-orm: v0.31.0

No config path provided, using default path
Reading config file '/workspaces/hashira/packages/db/drizzle.config.ts'
Using 'pg' driver for database querying
[⣷] Pulling schema from database...Error: The server does not support SSL connections
at /workspaces/hashira/node_modules/drizzle-kit/bin.cjs:77692:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.query (/workspaces/hashira/node_modules/drizzle-kit/bin.cjs:119631:26)
at async fromDatabase2 (/workspaces/hashira/node_modules/drizzle-kit/bin.cjs:21560:25)
$ bun run --cwd packages/db push
$ drizzle-kit push
drizzle-kit: v0.22.1
drizzle-orm: v0.31.0

No config path provided, using default path
Reading config file '/workspaces/hashira/packages/db/drizzle.config.ts'
Using 'pg' driver for database querying
[⣷] Pulling schema from database...Error: The server does not support SSL connections
at /workspaces/hashira/node_modules/drizzle-kit/bin.cjs:77692:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.query (/workspaces/hashira/node_modules/drizzle-kit/bin.cjs:119631:26)
at async fromDatabase2 (/workspaces/hashira/node_modules/drizzle-kit/bin.cjs:21560:25)
and this is my current config
export default {
schema: "./src/schema/*",
out: "./drizzle/",
dialect: "postgresql",
dbCredentials: {
database: env.POSTGRES_DB,
host: env.POSTGRES_HOST,
password: env.POSTGRES_PASSWORD,
user: env.POSTGRES_USER,
},
strict: true,
verbose: true,
} satisfies Config;
export default {
schema: "./src/schema/*",
out: "./drizzle/",
dialect: "postgresql",
dbCredentials: {
database: env.POSTGRES_DB,
host: env.POSTGRES_HOST,
password: env.POSTGRES_PASSWORD,
user: env.POSTGRES_USER,
},
strict: true,
verbose: true,
} satisfies Config;
3 Replies
hkg
hkgOP7mo ago
My database is hosted as a service in a docker container .
nk
nk7mo ago
@hkg add "ssl: false" in dbCredentials?
hkg
hkgOP7mo ago
I've tried false, "disabled" and similar flags, but to no avail. @nk, nvm, I've struggled with the issue for two days but couldn't notice that I was editing test/drizzle.config.ts and not drizle.config.ts 😅
Want results from more Discord servers?
Add your server