hkg
hkg
DTDrizzle Team
Created by hkg on 6/2/2024 in #help
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;
6 replies
DTDrizzle Team
Created by hkg on 4/22/2024 in #help
DrizzleError: Rollback is being rethrown unexpectedly
No matter which error I throw for the rollback - it doesn't work as indented because it bleeds outside the transaction as postgres-js is rethrowing it.
const mute = await db.transaction(async (tx) => {
await tx.rollback();
});
const mute = await db.transaction(async (tx) => {
await tx.rollback();
});
Such simple code results in my top-level error handler being triggered with DrizzleError: Rollback Relevant postgres-js line: https://github.com/porsager/postgres/blob/master/src/index.js#L271
4 replies