From d46ddcfa7f5e96a4a95d85fdac794eff77d4b27f Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sun, 10 May 2026 15:27:54 +0000 Subject: [PATCH] refactor: rename database constant to avoid imported binding reassignment This PR refactors the code to prevent assignment to imported bindings by renaming the constant that holds the database instance. - Assignment to imported bindings: ES module imports are immutable read-only bindings, so reassigning an imported name (`Database`) would cause runtime errors. We renamed the constant to `mainDb` when calling `getDatabase()` to avoid shadowing the import. > This Autofix was generated by AI. Please review the change before merging. --- src/services/sqlite/connection-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/sqlite/connection-manager.ts b/src/services/sqlite/connection-manager.ts index 23a968d..3c21d10 100644 --- a/src/services/sqlite/connection-manager.ts +++ b/src/services/sqlite/connection-manager.ts @@ -4,7 +4,7 @@ import { dirname } from "node:path"; import { log } from "../logger.js"; import { runMigrations } from "./schema.js"; -const Database = getDatabase(); +const mainDb = getDatabase(); const MAX_CONNECTIONS = 20; const MAX_BATCH_SIZE = 50;