From 766be9de3f9d0af1865272db716bdfefb481fd38 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Wed, 8 Oct 2025 21:15:41 +0200 Subject: [PATCH] fix(knex): remove sqlite error message We don't want to show this error message as we know of this behaviour See: https://knexjs.org/guide/query-builder.html#insert Signed-off-by: Philip Molares --- backend/knexfile.ts | 1 + backend/src/config/database.config.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/knexfile.ts b/backend/knexfile.ts index 100629cc7..a82f04a43 100644 --- a/backend/knexfile.ts +++ b/backend/knexfile.ts @@ -12,6 +12,7 @@ const config: { [key: string]: Knex.Config } = { connection: { filename: './hedgedoc.sqlite', }, + useNullAsDefault: true, migrations: { directory: './src/database/migrations', }, diff --git a/backend/src/config/database.config.ts b/backend/src/config/database.config.ts index a03329d1d..3552a4b9c 100644 --- a/backend/src/config/database.config.ts +++ b/backend/src/config/database.config.ts @@ -84,6 +84,7 @@ export function getKnexConfig(databaseConfig: DatabaseConfig): Knex.Config { connection: { filename: databaseConfig.name, }, + useNullAsDefault: true, }; case DatabaseType.POSTGRES: return {