Skip to content

Build your personal knowledge base with Trilium Notes

filling up missing sync rows

azivner2e11494cac8f
diff --git a/migrations/0052__fill_sync_table.sql b/migrations/0052__fill_sync_table.sql
new file mode 100644
index 0000000000..86787275e8
--- /dev/null
+++ b/migrations/0052__fill_sync_table.sql
@@ -0,0 +1,8 @@
+INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id)
+ SELECT 'notes', note_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes;
+
+INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id)
+ SELECT 'notes_tree', note_tree_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes_tree;
+
+INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id)
+ SELECT 'notes_history', note_history_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes_history;
\ No newline at end of file
diff --git a/services/app_info.js b/services/app_info.js
index 60a9b2d9b4..cdf1e0b58c 100644
--- a/services/app_info.js
+++ b/services/app_info.js
@@ -3,7 +3,7 @@
const build = require('./build');
const packageJson = require('../package');
-const APP_DB_VERSION = 51;
+const APP_DB_VERSION = 52;
module.exports = {
app_version: packageJson.version,