From 9a04a76672df7301c3feb81fcaea07c6ff7a917c Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 10 May 2022 23:42:28 +0200 Subject: [PATCH 1/3] remove recent notes from entity changes migration, #2842 (cherry picked from commit bbbad6776468258355dcb9d821495f00cea1134c) --- db/migrations/0195__remove_recent_notes_from_entity_changes.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 db/migrations/0195__remove_recent_notes_from_entity_changes.sql diff --git a/db/migrations/0195__remove_recent_notes_from_entity_changes.sql b/db/migrations/0195__remove_recent_notes_from_entity_changes.sql new file mode 100644 index 000000000..834db7fe9 --- /dev/null +++ b/db/migrations/0195__remove_recent_notes_from_entity_changes.sql @@ -0,0 +1,2 @@ +-- removing potential remnants of recent notes in entity changes, see https://github.com/zadam/trilium/issues/2842 +DELETE FROM entity_changes WHERE entityName = 'recent_notes'; From 77f8474d83a1d122fb1b1c73687ff5ca39488a50 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 10 May 2022 23:45:06 +0200 Subject: [PATCH 2/3] don't fill recent notes into entity_changes (cherry picked from commit 963c18b8e4d04bce65623f9542a18cdeeffa2d75) --- src/services/entity_changes.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/services/entity_changes.js b/src/services/entity_changes.js index 209e0c7f5..62eabc944 100644 --- a/src/services/entity_changes.js +++ b/src/services/entity_changes.js @@ -135,7 +135,6 @@ function fillAllEntityChanges() { fillEntityChanges("branches", "branchId"); fillEntityChanges("note_revisions", "noteRevisionId"); fillEntityChanges("note_revision_contents", "noteRevisionId"); - fillEntityChanges("recent_notes", "noteId"); fillEntityChanges("attributes", "attributeId"); fillEntityChanges("etapi_tokens", "etapiTokenId"); fillEntityChanges("options", "name", 'isSynced = 1'); From c421ee79b0df62f452a8802e0ea9ae9a83005dde Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 10 May 2022 23:47:25 +0200 Subject: [PATCH 3/3] increase DB version --- src/services/app_info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/app_info.js b/src/services/app_info.js index 9ee16221f..60fc6bc68 100644 --- a/src/services/app_info.js +++ b/src/services/app_info.js @@ -4,7 +4,7 @@ const build = require('./build'); const packageJson = require('../../package'); const {TRILIUM_DATA_DIR} = require('./data_dir'); -const APP_DB_VERSION = 194; +const APP_DB_VERSION = 195; const SYNC_VERSION = 25; const CLIPPER_PROTOCOL_VERSION = "1.0";