Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fixes
zadam67663fba5069
diff --git a/src/services/notes.js b/src/services/notes.jsindex cd516eaab7..171e0c8f09 100644--- a/src/services/notes.js+++ b/src/services/notes.js@@ -480,7 +480,7 @@ async function eraseDeletedNotes() {SET content = NULL,utcDateModified = '${utcNowDateTime}'WHERE noteRevisionId IN- (SELECT noteRevisionId FROM note_revisions WHERE isErased = 0 AND noteId IN ((???)))`, noteIdsToErase);+ (SELECT noteRevisionId FROM note_revisions WHERE isErased = 0 AND noteId IN (???))`, noteIdsToErase);await sql.executeMany(`UPDATE note_revisions@@ -530,7 +530,7 @@ async function duplicateNote(noteId, parentNoteId) {sqlInit.dbReady.then(() => {// first cleanup kickoff 5 minutes after startup- setTimeout(cls.wrap(eraseDeletedNotes), 5 * 60 * 1000);+ setTimeout(cls.wrap(eraseDeletedNotes), 0 * 60 * 1000);setInterval(cls.wrap(eraseDeletedNotes), 4 * 3600 * 1000);});diff --git a/src/services/sql_init.js b/src/services/sql_init.jsindex 7e81d2d024..e93ff5ad0d 100644--- a/src/services/sql_init.js+++ b/src/services/sql_init.js@@ -173,9 +173,11 @@ async function isDbUpToDate() {}async function dbInitialized() {- await optionService.setOption('initialized', 'true');+ if (!await isDbInitialized()) {+ await optionService.setOption('initialized', 'true');- await initDbConnection();+ await initDbConnection();+ }}dbReady.then(async () => {