From 40ed3216a34d81bee62d4f0d96325bb1c07227e0 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 6 Jul 2017 19:48:17 +0000 Subject: [PATCH] Fixed RN sync issue --- CliClient/app/main.js | 21 +- CliClient/tests/logs/log.txt | 4305 +++++++++++++++++++++ CliClient/tests/test-utils.js | 9 +- ReactNativeClient/lib/models/base-item.js | 37 +- ReactNativeClient/lib/onedrive-api.js | 30 +- ReactNativeClient/lib/synchronizer.js | 12 +- ReactNativeClient/root.js | 12 +- 7 files changed, 4393 insertions(+), 33 deletions(-) diff --git a/CliClient/app/main.js b/CliClient/app/main.js index 526de9fb7..e0b1b9d5e 100644 --- a/CliClient/app/main.js +++ b/CliClient/app/main.js @@ -16,6 +16,7 @@ import { Resource } from 'lib/models/resource.js'; import { BaseItem } from 'lib/models/base-item.js'; import { Note } from 'lib/models/note.js'; import { Tag } from 'lib/models/tag.js'; +import { NoteTag } from 'lib/models/note-tag.js'; import { Setting } from 'lib/models/setting.js'; import { Synchronizer } from 'lib/synchronizer.js'; import { Logger } from 'lib/logger.js'; @@ -23,6 +24,7 @@ import { uuid } from 'lib/uuid.js'; import { sprintf } from 'sprintf-js'; import { importEnex } from 'import-enex'; import { vorpalUtils } from 'vorpal-utils.js'; +import { reg } from 'lib/registry.js'; import { FsDriverNode } from './fs-driver-node.js'; import { filename, basename } from 'lib/path-utils.js'; import { _ } from 'lib/locale.js'; @@ -677,11 +679,7 @@ async function synchronizer(syncTarget) { let fileApi = null; if (syncTarget == 'onedrive') { - let oneDriveApi = oneDriveApi.instance(); - // const CLIENT_ID = 'e09fc0de-c958-424f-83a2-e56a721d331b'; - // const CLIENT_SECRET = 'JA3cwsqSGHFtjMwd5XoF5L5'; - - //let driver = new FileApiDriverOneDrive(CLIENT_ID, CLIENT_SECRET); + const oneDriveApi = reg.oneDriveApi(); let driver = new FileApiDriverOneDrive(oneDriveApi); let auth = Setting.value('sync.onedrive.auth'); @@ -693,11 +691,6 @@ async function synchronizer(syncTarget) { Setting.setValue('sync.onedrive.auth', JSON.stringify(auth)); } - //oneDriveApi.setAuth(auth); - oneDriveApi.on('authRefreshed', (a) => { - Setting.setValue('sync.onedrive.auth', JSON.stringify(a)); - }); - let appDir = await oneDriveApi.appDirectory(); logger.info('App dir: ' + appDir); fileApi = new FileApi(appDir, driver); @@ -939,6 +932,14 @@ async function main() { logger.info(sprintf('Starting %s %s...', packageJson.name, packageJson.version)); logger.info('Profile directory: ' + profileDir); + // That's not good, but it's to avoid circular dependency issues + // in the BaseItem class. + BaseItem.loadClass('Note', Note); + BaseItem.loadClass('Folder', Folder); + BaseItem.loadClass('Resource', Resource); + BaseItem.loadClass('Tag', Tag); + BaseItem.loadClass('NoteTag', NoteTag); + database_ = new Database(new DatabaseDriverNode()); database_.setLogger(dbLogger); await database_.open({ name: profileDir + '/database.sqlite' }); diff --git a/CliClient/tests/logs/log.txt b/CliClient/tests/logs/log.txt index 1f939398f..06680ae4f 100644 --- a/CliClient/tests/logs/log.txt +++ b/CliClient/tests/logs/log.txt @@ -3895,3 +3895,4308 @@ 2017-07-05 23:28:06: Total resources: 0 2017-07-05 23:28:06: SELECT note_id FROM note_tags WHERE tag_id = ? 2017-07-05 23:28:06: ["90498ff7e1ed4fa983245bf721149059"] +2017-07-06 16:07:32: Database was open successfully +2017-07-06 16:07:32: Checking for database schema update... +2017-07-06 16:07:32: SELECT * FROM version LIMIT 1 +2017-07-06 16:07:32: Database is new - creating the schema... +2017-07-06 16:07:32: BEGIN TRANSACTION +2017-07-06 16:07:32: CREATE TABLE folders ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:07:32: CREATE INDEX folders_title ON folders (title); +2017-07-06 16:07:32: CREATE INDEX folders_updated_time ON folders (updated_time); +2017-07-06 16:07:32: CREATE INDEX folders_sync_time ON folders (sync_time); +2017-07-06 16:07:32: CREATE TABLE notes ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", body TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0, is_conflict INT NOT NULL DEFAULT 0, latitude NUMERIC NOT NULL DEFAULT 0, longitude NUMERIC NOT NULL DEFAULT 0, altitude NUMERIC NOT NULL DEFAULT 0, author TEXT NOT NULL DEFAULT "", source_url TEXT NOT NULL DEFAULT "", is_todo INT NOT NULL DEFAULT 0, todo_due INT NOT NULL DEFAULT 0, todo_completed INT NOT NULL DEFAULT 0, source TEXT NOT NULL DEFAULT "", source_application TEXT NOT NULL DEFAULT "", application_data TEXT NOT NULL DEFAULT "", `order` INT NOT NULL DEFAULT 0); +2017-07-06 16:07:32: CREATE INDEX notes_title ON notes (title); +2017-07-06 16:07:32: CREATE INDEX notes_updated_time ON notes (updated_time); +2017-07-06 16:07:32: CREATE INDEX notes_sync_time ON notes (sync_time); +2017-07-06 16:07:32: CREATE INDEX notes_is_conflict ON notes (is_conflict); +2017-07-06 16:07:32: CREATE INDEX notes_is_todo ON notes (is_todo); +2017-07-06 16:07:32: CREATE INDEX notes_order ON notes (`order`); +2017-07-06 16:07:32: CREATE TABLE deleted_items ( id INTEGER PRIMARY KEY, item_type INT NOT NULL, item_id TEXT NOT NULL, deleted_time INT NOT NULL); +2017-07-06 16:07:32: CREATE TABLE tags ( id TEXT PRIMARY KEY, title TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:07:32: CREATE TABLE note_tags ( id TEXT PRIMARY KEY, note_id TEXT NOT NULL, tag_id TEXT NOT NULL, created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:07:32: CREATE TABLE resources ( id TEXT PRIMARY KEY, title TEXT NOT NULL DEFAULT "", mime TEXT NOT NULL, filename TEXT NOT NULL, created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:07:32: CREATE TABLE settings ( `key` TEXT PRIMARY KEY, `value` TEXT, `type` INT); +2017-07-06 16:07:32: CREATE TABLE table_fields ( id INTEGER PRIMARY KEY, table_name TEXT, field_name TEXT, field_type INT, field_default TEXT); +2017-07-06 16:07:32: CREATE TABLE version ( version INT); +2017-07-06 16:07:32: INSERT INTO version (version) VALUES (1); +2017-07-06 16:07:32: INSERT INTO settings (`key`, `value`, `type`) VALUES ("clientId", "ae6b3b381bb74e968a11bdfab7598f11", "2") +2017-07-06 16:07:32: COMMIT +2017-07-06 16:07:32: Database schema created successfully +2017-07-06 16:07:32: Initializing tables... +2017-07-06 16:07:32: SELECT name FROM sqlite_master WHERE type="table" +2017-07-06 16:07:32: PRAGMA table_info("folders") +2017-07-06 16:07:32: PRAGMA table_info("notes") +2017-07-06 16:07:32: PRAGMA table_info("deleted_items") +2017-07-06 16:07:32: PRAGMA table_info("tags") +2017-07-06 16:07:32: PRAGMA table_info("note_tags") +2017-07-06 16:07:32: PRAGMA table_info("resources") +2017-07-06 16:07:32: PRAGMA table_info("settings") +2017-07-06 16:07:32: PRAGMA table_info("version") +2017-07-06 16:07:32: BEGIN TRANSACTION +2017-07-06 16:07:32: DELETE FROM table_fields +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["folders","id",2,null] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["folders","parent_id",2,""] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["folders","title",2,""] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["folders","created_time",1,null] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["folders","updated_time",1,null] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["folders","sync_time",1,"0"] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","id",2,null] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","parent_id",2,""] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","title",2,""] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","body",2,""] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","created_time",1,null] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","updated_time",1,null] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","sync_time",1,"0"] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","is_conflict",1,"0"] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","latitude",3,"0"] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","longitude",3,"0"] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","altitude",3,"0"] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","author",2,""] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","source_url",2,""] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:32: ["notes","is_todo",1,"0"] +2017-07-06 16:07:32: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["notes","todo_due",1,"0"] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["notes","todo_completed",1,"0"] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["notes","source",2,""] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["notes","source_application",2,""] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["notes","application_data",2,""] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["notes","order",1,"0"] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["deleted_items","id",null,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["deleted_items","item_type",1,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["deleted_items","item_id",2,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["deleted_items","deleted_time",1,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["tags","id",2,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["tags","title",2,""] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["tags","created_time",1,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["tags","updated_time",1,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["tags","sync_time",1,"0"] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["note_tags","id",2,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["note_tags","note_id",2,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["note_tags","tag_id",2,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["note_tags","created_time",1,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["note_tags","updated_time",1,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["note_tags","sync_time",1,"0"] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["resources","id",2,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["resources","title",2,""] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["resources","mime",2,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["resources","filename",2,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["resources","created_time",1,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["resources","updated_time",1,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["resources","sync_time",1,"0"] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["settings","key",2,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["settings","value",2,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["settings","type",1,null] +2017-07-06 16:07:33: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:33: ["version","version",1,null] +2017-07-06 16:07:33: COMMIT +2017-07-06 16:07:33: SELECT * FROM version LIMIT 1 +2017-07-06 16:07:33: Current database version +2017-07-06 16:07:33: SELECT * FROM table_fields +2017-07-06 16:07:33: BEGIN TRANSACTION +2017-07-06 16:07:33: DELETE FROM notes +2017-07-06 16:07:33: DELETE FROM folders +2017-07-06 16:07:33: DELETE FROM resources +2017-07-06 16:07:33: DELETE FROM tags +2017-07-06 16:07:33: DELETE FROM note_tags +2017-07-06 16:07:33: COMMIT +2017-07-06 16:07:33: SELECT * FROM settings +2017-07-06 16:07:33: Database was open successfully +2017-07-06 16:07:33: Checking for database schema update... +2017-07-06 16:07:33: SELECT * FROM version LIMIT 1 +2017-07-06 16:07:33: Database is new - creating the schema... +2017-07-06 16:07:33: BEGIN TRANSACTION +2017-07-06 16:07:33: CREATE TABLE folders ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:07:33: CREATE INDEX folders_title ON folders (title); +2017-07-06 16:07:33: CREATE INDEX folders_updated_time ON folders (updated_time); +2017-07-06 16:07:33: CREATE INDEX folders_sync_time ON folders (sync_time); +2017-07-06 16:07:33: CREATE TABLE notes ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", body TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0, is_conflict INT NOT NULL DEFAULT 0, latitude NUMERIC NOT NULL DEFAULT 0, longitude NUMERIC NOT NULL DEFAULT 0, altitude NUMERIC NOT NULL DEFAULT 0, author TEXT NOT NULL DEFAULT "", source_url TEXT NOT NULL DEFAULT "", is_todo INT NOT NULL DEFAULT 0, todo_due INT NOT NULL DEFAULT 0, todo_completed INT NOT NULL DEFAULT 0, source TEXT NOT NULL DEFAULT "", source_application TEXT NOT NULL DEFAULT "", application_data TEXT NOT NULL DEFAULT "", `order` INT NOT NULL DEFAULT 0); +2017-07-06 16:07:33: CREATE INDEX notes_title ON notes (title); +2017-07-06 16:07:33: CREATE INDEX notes_updated_time ON notes (updated_time); +2017-07-06 16:07:33: CREATE INDEX notes_sync_time ON notes (sync_time); +2017-07-06 16:07:33: CREATE INDEX notes_is_conflict ON notes (is_conflict); +2017-07-06 16:07:33: CREATE INDEX notes_is_todo ON notes (is_todo); +2017-07-06 16:07:33: CREATE INDEX notes_order ON notes (`order`); +2017-07-06 16:07:33: CREATE TABLE deleted_items ( id INTEGER PRIMARY KEY, item_type INT NOT NULL, item_id TEXT NOT NULL, deleted_time INT NOT NULL); +2017-07-06 16:07:33: CREATE TABLE tags ( id TEXT PRIMARY KEY, title TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:07:33: CREATE TABLE note_tags ( id TEXT PRIMARY KEY, note_id TEXT NOT NULL, tag_id TEXT NOT NULL, created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:07:33: CREATE TABLE resources ( id TEXT PRIMARY KEY, title TEXT NOT NULL DEFAULT "", mime TEXT NOT NULL, filename TEXT NOT NULL, created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:07:33: CREATE TABLE settings ( `key` TEXT PRIMARY KEY, `value` TEXT, `type` INT); +2017-07-06 16:07:33: CREATE TABLE table_fields ( id INTEGER PRIMARY KEY, table_name TEXT, field_name TEXT, field_type INT, field_default TEXT); +2017-07-06 16:07:33: CREATE TABLE version ( version INT); +2017-07-06 16:07:33: INSERT INTO version (version) VALUES (1); +2017-07-06 16:07:33: INSERT INTO settings (`key`, `value`, `type`) VALUES ("clientId", "e77d84759bdf49ef9d3450224074312f", "2") +2017-07-06 16:07:33: COMMIT +2017-07-06 16:07:34: Database schema created successfully +2017-07-06 16:07:34: Initializing tables... +2017-07-06 16:07:34: SELECT name FROM sqlite_master WHERE type="table" +2017-07-06 16:07:34: PRAGMA table_info("folders") +2017-07-06 16:07:34: PRAGMA table_info("notes") +2017-07-06 16:07:34: PRAGMA table_info("deleted_items") +2017-07-06 16:07:34: PRAGMA table_info("tags") +2017-07-06 16:07:34: PRAGMA table_info("note_tags") +2017-07-06 16:07:34: PRAGMA table_info("resources") +2017-07-06 16:07:34: PRAGMA table_info("settings") +2017-07-06 16:07:34: PRAGMA table_info("version") +2017-07-06 16:07:34: BEGIN TRANSACTION +2017-07-06 16:07:34: DELETE FROM table_fields +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["folders","id",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["folders","parent_id",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["folders","title",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["folders","created_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["folders","updated_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["folders","sync_time",1,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","id",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","parent_id",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","title",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","body",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","created_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","updated_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","sync_time",1,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","is_conflict",1,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","latitude",3,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","longitude",3,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","altitude",3,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","author",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","source_url",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","is_todo",1,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","todo_due",1,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","todo_completed",1,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","source",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","source_application",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","application_data",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["notes","order",1,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["deleted_items","id",null,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["deleted_items","item_type",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["deleted_items","item_id",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["deleted_items","deleted_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["tags","id",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["tags","title",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["tags","created_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["tags","updated_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["tags","sync_time",1,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["note_tags","id",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["note_tags","note_id",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["note_tags","tag_id",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["note_tags","created_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["note_tags","updated_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["note_tags","sync_time",1,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["resources","id",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["resources","title",2,""] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["resources","mime",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["resources","filename",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["resources","created_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["resources","updated_time",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["resources","sync_time",1,"0"] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["settings","key",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["settings","value",2,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["settings","type",1,null] +2017-07-06 16:07:34: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:34: ["version","version",1,null] +2017-07-06 16:07:34: COMMIT +2017-07-06 16:07:34: SELECT * FROM version LIMIT 1 +2017-07-06 16:07:35: Current database version +2017-07-06 16:07:35: SELECT * FROM table_fields +2017-07-06 16:07:35: BEGIN TRANSACTION +2017-07-06 16:07:35: DELETE FROM notes +2017-07-06 16:07:35: DELETE FROM folders +2017-07-06 16:07:35: DELETE FROM resources +2017-07-06 16:07:35: DELETE FROM tags +2017-07-06 16:07:35: DELETE FROM note_tags +2017-07-06 16:07:35: COMMIT +2017-07-06 16:07:35: SELECT * FROM settings +2017-07-06 16:07:35: SELECT * FROM settings +2017-07-06 16:07:35: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:35: ["folder1",1499353655442,"2b0d5012396343df85acbea093013657",1499353655442] +2017-07-06 16:07:35: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:07:35: ["2b0d5012396343df85acbea093013657","un","joplin","SET_ME",1499353655648,"935b6ae759db4be0b3f5fa859327d9c8",1499353655649] +2017-07-06 16:07:35: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:07:35: ["935b6ae759db4be0b3f5fa859327d9c8"] +2017-07-06 16:07:35: SELECT * FROM `folders` +2017-07-06 16:07:35: SELECT * FROM `notes` +2017-07-06 16:07:35: Starting synchronization... [1499353655894] +2017-07-06 16:07:35: mkdir /root/.sync +2017-07-06 16:07:35: mkdir /root/.resource +2017-07-06 16:07:35: TypeError: Cannot read property 'modelSelectAll' of undefined +TypeError: Cannot read property 'modelSelectAll' of undefined + at Function._callee6$ (/mnt/d/Web/www/joplin/CliClient/app/lib/models/base-item.js:227:21) + at tryCatch (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:65:40) + at GeneratorFunctionPrototype.invoke [as _invoke] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:303:22) + at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:117:21) + at step (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30) + at /mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14 + at Promise.F (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js:35:28) + at Function. (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12) + at Function.itemsThatNeedSync (/mnt/d/Web/www/joplin/CliClient/build/lib/models/base-item.js:629:18) + at Synchronizer._callee2$ (/mnt/d/Web/www/joplin/CliClient/app/lib/synchronizer.js:131:33) +2017-07-06 16:07:44: BEGIN TRANSACTION +2017-07-06 16:07:44: DELETE FROM notes +2017-07-06 16:07:44: DELETE FROM folders +2017-07-06 16:07:44: DELETE FROM resources +2017-07-06 16:07:44: DELETE FROM tags +2017-07-06 16:07:44: DELETE FROM note_tags +2017-07-06 16:07:44: COMMIT +2017-07-06 16:07:44: SELECT * FROM settings +2017-07-06 16:07:44: BEGIN TRANSACTION +2017-07-06 16:07:44: DELETE FROM notes +2017-07-06 16:07:44: DELETE FROM folders +2017-07-06 16:07:44: DELETE FROM resources +2017-07-06 16:07:44: DELETE FROM tags +2017-07-06 16:07:44: DELETE FROM note_tags +2017-07-06 16:07:44: COMMIT +2017-07-06 16:07:45: SELECT * FROM settings +2017-07-06 16:07:45: SELECT * FROM settings +2017-07-06 16:07:45: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:45: ["folder1",1499353665256,"5ae9c7279c36489cad5001dcd3f11dfd",1499353665256] +2017-07-06 16:07:45: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:07:45: ["5ae9c7279c36489cad5001dcd3f11dfd","un","joplin","SET_ME",1499353665492,"f14d53660d4d421aa7dc357d21d08198",1499353665492] +2017-07-06 16:07:45: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:07:45: ["f14d53660d4d421aa7dc357d21d08198"] +2017-07-06 16:07:45: Synchronization is already in progress. State: started +2017-07-06 16:07:45: UPDATE `notes` SET `title`=?, `updated_time`=? WHERE id=? +2017-07-06 16:07:45: ["un UPDATE",1499353665809,"f14d53660d4d421aa7dc357d21d08198"] +2017-07-06 16:07:45: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:07:45: ["f14d53660d4d421aa7dc357d21d08198"] +2017-07-06 16:07:45: SELECT * FROM `folders` +2017-07-06 16:07:45: SELECT * FROM `notes` +2017-07-06 16:07:45: Synchronization is already in progress. State: started +2017-07-06 16:07:45: list /root +2017-07-06 16:07:46: stat /root/5ae9c7279c36489cad5001dcd3f11dfd.md +2017-07-06 16:07:46: stat /root/f14d53660d4d421aa7dc357d21d08198.md +2017-07-06 16:07:46: BEGIN TRANSACTION +2017-07-06 16:07:46: DELETE FROM notes +2017-07-06 16:07:46: DELETE FROM folders +2017-07-06 16:07:46: DELETE FROM resources +2017-07-06 16:07:46: DELETE FROM tags +2017-07-06 16:07:46: DELETE FROM note_tags +2017-07-06 16:07:46: COMMIT +2017-07-06 16:07:46: SELECT * FROM settings +2017-07-06 16:07:46: BEGIN TRANSACTION +2017-07-06 16:07:46: DELETE FROM notes +2017-07-06 16:07:46: DELETE FROM folders +2017-07-06 16:07:46: DELETE FROM resources +2017-07-06 16:07:46: DELETE FROM tags +2017-07-06 16:07:46: DELETE FROM note_tags +2017-07-06 16:07:46: COMMIT +2017-07-06 16:07:46: SELECT * FROM settings +2017-07-06 16:07:46: SELECT * FROM settings +2017-07-06 16:07:46: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:07:46: ["folder1",1499353666747,"af2a0100ba0d40c6985f3c8ae5745b88",1499353666748] +2017-07-06 16:07:46: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:07:46: ["af2a0100ba0d40c6985f3c8ae5745b88","un","joplin","SET_ME",1499353666927,"b8560cebfa1641ba8bd9924ab0c4ef6a",1499353666927] +2017-07-06 16:07:47: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:07:47: ["b8560cebfa1641ba8bd9924ab0c4ef6a"] +2017-07-06 16:07:47: Synchronization is already in progress. State: started +2017-07-06 16:07:47: SELECT * FROM settings +2017-07-06 16:07:47: Starting synchronization... [1499353667332] +2017-07-06 16:07:47: mkdir /root/.sync +2017-07-06 16:07:47: mkdir /root/.resource +2017-07-06 16:07:47: TypeError: Cannot read property 'modelSelectAll' of undefined +TypeError: Cannot read property 'modelSelectAll' of undefined + at Function._callee6$ (/mnt/d/Web/www/joplin/CliClient/app/lib/models/base-item.js:227:21) + at tryCatch (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:65:40) + at GeneratorFunctionPrototype.invoke [as _invoke] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:303:22) + at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/mnt/d/Web/www/joplin/CliClient/node_modules/regenerator-runtime/runtime.js:117:21) + at step (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30) + at /mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14 + at Promise.F (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/node_modules/core-js/library/modules/_export.js:35:28) + at Function. (/mnt/d/Web/www/joplin/CliClient/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12) + at Function.itemsThatNeedSync (/mnt/d/Web/www/joplin/CliClient/build/lib/models/base-item.js:629:18) + at Synchronizer._callee2$ (/mnt/d/Web/www/joplin/CliClient/app/lib/synchronizer.js:131:33) +2017-07-06 16:10:08: Database was open successfully +2017-07-06 16:10:08: Checking for database schema update... +2017-07-06 16:10:08: SELECT * FROM version LIMIT 1 +2017-07-06 16:10:08: Database is new - creating the schema... +2017-07-06 16:10:08: BEGIN TRANSACTION +2017-07-06 16:10:08: CREATE TABLE folders ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:10:08: CREATE INDEX folders_title ON folders (title); +2017-07-06 16:10:08: CREATE INDEX folders_updated_time ON folders (updated_time); +2017-07-06 16:10:08: CREATE INDEX folders_sync_time ON folders (sync_time); +2017-07-06 16:10:08: CREATE TABLE notes ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", body TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0, is_conflict INT NOT NULL DEFAULT 0, latitude NUMERIC NOT NULL DEFAULT 0, longitude NUMERIC NOT NULL DEFAULT 0, altitude NUMERIC NOT NULL DEFAULT 0, author TEXT NOT NULL DEFAULT "", source_url TEXT NOT NULL DEFAULT "", is_todo INT NOT NULL DEFAULT 0, todo_due INT NOT NULL DEFAULT 0, todo_completed INT NOT NULL DEFAULT 0, source TEXT NOT NULL DEFAULT "", source_application TEXT NOT NULL DEFAULT "", application_data TEXT NOT NULL DEFAULT "", `order` INT NOT NULL DEFAULT 0); +2017-07-06 16:10:08: CREATE INDEX notes_title ON notes (title); +2017-07-06 16:10:08: CREATE INDEX notes_updated_time ON notes (updated_time); +2017-07-06 16:10:08: CREATE INDEX notes_sync_time ON notes (sync_time); +2017-07-06 16:10:08: CREATE INDEX notes_is_conflict ON notes (is_conflict); +2017-07-06 16:10:08: CREATE INDEX notes_is_todo ON notes (is_todo); +2017-07-06 16:10:08: CREATE INDEX notes_order ON notes (`order`); +2017-07-06 16:10:08: CREATE TABLE deleted_items ( id INTEGER PRIMARY KEY, item_type INT NOT NULL, item_id TEXT NOT NULL, deleted_time INT NOT NULL); +2017-07-06 16:10:08: CREATE TABLE tags ( id TEXT PRIMARY KEY, title TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:10:08: CREATE TABLE note_tags ( id TEXT PRIMARY KEY, note_id TEXT NOT NULL, tag_id TEXT NOT NULL, created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:10:08: CREATE TABLE resources ( id TEXT PRIMARY KEY, title TEXT NOT NULL DEFAULT "", mime TEXT NOT NULL, filename TEXT NOT NULL, created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:10:08: CREATE TABLE settings ( `key` TEXT PRIMARY KEY, `value` TEXT, `type` INT); +2017-07-06 16:10:08: CREATE TABLE table_fields ( id INTEGER PRIMARY KEY, table_name TEXT, field_name TEXT, field_type INT, field_default TEXT); +2017-07-06 16:10:08: CREATE TABLE version ( version INT); +2017-07-06 16:10:08: INSERT INTO version (version) VALUES (1); +2017-07-06 16:10:08: INSERT INTO settings (`key`, `value`, `type`) VALUES ("clientId", "5ab45f40537047c7bd97dd21cdc16133", "2") +2017-07-06 16:10:08: COMMIT +2017-07-06 16:10:09: Database schema created successfully +2017-07-06 16:10:09: Initializing tables... +2017-07-06 16:10:09: SELECT name FROM sqlite_master WHERE type="table" +2017-07-06 16:10:09: PRAGMA table_info("folders") +2017-07-06 16:10:09: PRAGMA table_info("notes") +2017-07-06 16:10:09: PRAGMA table_info("deleted_items") +2017-07-06 16:10:09: PRAGMA table_info("tags") +2017-07-06 16:10:09: PRAGMA table_info("note_tags") +2017-07-06 16:10:09: PRAGMA table_info("resources") +2017-07-06 16:10:09: PRAGMA table_info("settings") +2017-07-06 16:10:09: PRAGMA table_info("version") +2017-07-06 16:10:09: BEGIN TRANSACTION +2017-07-06 16:10:09: DELETE FROM table_fields +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["folders","id",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["folders","parent_id",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["folders","title",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["folders","created_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["folders","updated_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["folders","sync_time",1,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","id",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","parent_id",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","title",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","body",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","created_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","updated_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","sync_time",1,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","is_conflict",1,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","latitude",3,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","longitude",3,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","altitude",3,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","author",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","source_url",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","is_todo",1,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","todo_due",1,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","todo_completed",1,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","source",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","source_application",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","application_data",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["notes","order",1,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["deleted_items","id",null,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["deleted_items","item_type",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["deleted_items","item_id",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["deleted_items","deleted_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["tags","id",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["tags","title",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["tags","created_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["tags","updated_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["tags","sync_time",1,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["note_tags","id",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["note_tags","note_id",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["note_tags","tag_id",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["note_tags","created_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["note_tags","updated_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["note_tags","sync_time",1,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["resources","id",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["resources","title",2,""] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["resources","mime",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["resources","filename",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["resources","created_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["resources","updated_time",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["resources","sync_time",1,"0"] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["settings","key",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["settings","value",2,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["settings","type",1,null] +2017-07-06 16:10:09: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:09: ["version","version",1,null] +2017-07-06 16:10:09: COMMIT +2017-07-06 16:10:09: SELECT * FROM version LIMIT 1 +2017-07-06 16:10:09: Current database version +2017-07-06 16:10:09: SELECT * FROM table_fields +2017-07-06 16:10:09: BEGIN TRANSACTION +2017-07-06 16:10:09: DELETE FROM notes +2017-07-06 16:10:09: DELETE FROM folders +2017-07-06 16:10:09: DELETE FROM resources +2017-07-06 16:10:09: DELETE FROM tags +2017-07-06 16:10:09: DELETE FROM note_tags +2017-07-06 16:10:09: COMMIT +2017-07-06 16:10:09: SELECT * FROM settings +2017-07-06 16:10:09: Database was open successfully +2017-07-06 16:10:09: Checking for database schema update... +2017-07-06 16:10:09: SELECT * FROM version LIMIT 1 +2017-07-06 16:10:09: Database is new - creating the schema... +2017-07-06 16:10:09: BEGIN TRANSACTION +2017-07-06 16:10:09: CREATE TABLE folders ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:10:10: CREATE INDEX folders_title ON folders (title); +2017-07-06 16:10:10: CREATE INDEX folders_updated_time ON folders (updated_time); +2017-07-06 16:10:10: CREATE INDEX folders_sync_time ON folders (sync_time); +2017-07-06 16:10:10: CREATE TABLE notes ( id TEXT PRIMARY KEY, parent_id TEXT NOT NULL DEFAULT "", title TEXT NOT NULL DEFAULT "", body TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0, is_conflict INT NOT NULL DEFAULT 0, latitude NUMERIC NOT NULL DEFAULT 0, longitude NUMERIC NOT NULL DEFAULT 0, altitude NUMERIC NOT NULL DEFAULT 0, author TEXT NOT NULL DEFAULT "", source_url TEXT NOT NULL DEFAULT "", is_todo INT NOT NULL DEFAULT 0, todo_due INT NOT NULL DEFAULT 0, todo_completed INT NOT NULL DEFAULT 0, source TEXT NOT NULL DEFAULT "", source_application TEXT NOT NULL DEFAULT "", application_data TEXT NOT NULL DEFAULT "", `order` INT NOT NULL DEFAULT 0); +2017-07-06 16:10:10: CREATE INDEX notes_title ON notes (title); +2017-07-06 16:10:10: CREATE INDEX notes_updated_time ON notes (updated_time); +2017-07-06 16:10:10: CREATE INDEX notes_sync_time ON notes (sync_time); +2017-07-06 16:10:10: CREATE INDEX notes_is_conflict ON notes (is_conflict); +2017-07-06 16:10:10: CREATE INDEX notes_is_todo ON notes (is_todo); +2017-07-06 16:10:10: CREATE INDEX notes_order ON notes (`order`); +2017-07-06 16:10:10: CREATE TABLE deleted_items ( id INTEGER PRIMARY KEY, item_type INT NOT NULL, item_id TEXT NOT NULL, deleted_time INT NOT NULL); +2017-07-06 16:10:10: CREATE TABLE tags ( id TEXT PRIMARY KEY, title TEXT NOT NULL DEFAULT "", created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:10:10: CREATE TABLE note_tags ( id TEXT PRIMARY KEY, note_id TEXT NOT NULL, tag_id TEXT NOT NULL, created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:10:10: CREATE TABLE resources ( id TEXT PRIMARY KEY, title TEXT NOT NULL DEFAULT "", mime TEXT NOT NULL, filename TEXT NOT NULL, created_time INT NOT NULL, updated_time INT NOT NULL, sync_time INT NOT NULL DEFAULT 0); +2017-07-06 16:10:10: CREATE TABLE settings ( `key` TEXT PRIMARY KEY, `value` TEXT, `type` INT); +2017-07-06 16:10:10: CREATE TABLE table_fields ( id INTEGER PRIMARY KEY, table_name TEXT, field_name TEXT, field_type INT, field_default TEXT); +2017-07-06 16:10:10: CREATE TABLE version ( version INT); +2017-07-06 16:10:10: INSERT INTO version (version) VALUES (1); +2017-07-06 16:10:10: INSERT INTO settings (`key`, `value`, `type`) VALUES ("clientId", "00a23f71af654f9a81ae8cd7d5b6f259", "2") +2017-07-06 16:10:10: COMMIT +2017-07-06 16:10:10: Database schema created successfully +2017-07-06 16:10:10: Initializing tables... +2017-07-06 16:10:10: SELECT name FROM sqlite_master WHERE type="table" +2017-07-06 16:10:10: PRAGMA table_info("folders") +2017-07-06 16:10:10: PRAGMA table_info("notes") +2017-07-06 16:10:10: PRAGMA table_info("deleted_items") +2017-07-06 16:10:10: PRAGMA table_info("tags") +2017-07-06 16:10:10: PRAGMA table_info("note_tags") +2017-07-06 16:10:10: PRAGMA table_info("resources") +2017-07-06 16:10:10: PRAGMA table_info("settings") +2017-07-06 16:10:10: PRAGMA table_info("version") +2017-07-06 16:10:10: BEGIN TRANSACTION +2017-07-06 16:10:10: DELETE FROM table_fields +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["folders","id",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["folders","parent_id",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["folders","title",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["folders","created_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["folders","updated_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["folders","sync_time",1,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","id",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","parent_id",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","title",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","body",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","created_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","updated_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","sync_time",1,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","is_conflict",1,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","latitude",3,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","longitude",3,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","altitude",3,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","author",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","source_url",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","is_todo",1,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","todo_due",1,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","todo_completed",1,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","source",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","source_application",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","application_data",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["notes","order",1,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["deleted_items","id",null,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["deleted_items","item_type",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["deleted_items","item_id",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["deleted_items","deleted_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["tags","id",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["tags","title",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["tags","created_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["tags","updated_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["tags","sync_time",1,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["note_tags","id",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["note_tags","note_id",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["note_tags","tag_id",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["note_tags","created_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["note_tags","updated_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["note_tags","sync_time",1,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["resources","id",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["resources","title",2,""] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["resources","mime",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["resources","filename",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["resources","created_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["resources","updated_time",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["resources","sync_time",1,"0"] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["settings","key",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["settings","value",2,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["settings","type",1,null] +2017-07-06 16:10:10: INSERT INTO `table_fields` (`table_name`, `field_name`, `field_type`, `field_default`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:10: ["version","version",1,null] +2017-07-06 16:10:10: COMMIT +2017-07-06 16:10:11: SELECT * FROM version LIMIT 1 +2017-07-06 16:10:11: Current database version +2017-07-06 16:10:11: SELECT * FROM table_fields +2017-07-06 16:10:11: BEGIN TRANSACTION +2017-07-06 16:10:11: DELETE FROM notes +2017-07-06 16:10:11: DELETE FROM folders +2017-07-06 16:10:11: DELETE FROM resources +2017-07-06 16:10:11: DELETE FROM tags +2017-07-06 16:10:11: DELETE FROM note_tags +2017-07-06 16:10:11: COMMIT +2017-07-06 16:10:11: SELECT * FROM settings +2017-07-06 16:10:11: SELECT * FROM settings +2017-07-06 16:10:11: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:11: ["folder1",1499353811650,"f304e300ab6643ec8e40082c75a76438",1499353811650] +2017-07-06 16:10:11: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:11: ["f304e300ab6643ec8e40082c75a76438","un","joplin","SET_ME",1499353811827,"edf0c71917384fa88ed57407cacd88ef",1499353811828] +2017-07-06 16:10:12: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:12: ["edf0c71917384fa88ed57407cacd88ef"] +2017-07-06 16:10:12: SELECT * FROM `folders` +2017-07-06 16:10:12: SELECT * FROM `notes` +2017-07-06 16:10:12: Starting synchronization... [1499353812038] +2017-07-06 16:10:12: mkdir /root/.sync +2017-07-06 16:10:12: mkdir /root/.resource +2017-07-06 16:10:12: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:12: stat /root/f304e300ab6643ec8e40082c75a76438.md +2017-07-06 16:10:12: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local f304e300ab6643ec8e40082c75a76438, "folder1") +2017-07-06 16:10:12: put /root/.sync/f304e300ab6643ec8e40082c75a76438.md_1499353812070 +2017-07-06 16:10:12: setTimestamp /root/.sync/f304e300ab6643ec8e40082c75a76438.md_1499353812070 +2017-07-06 16:10:12: move /root/.sync/f304e300ab6643ec8e40082c75a76438.md_1499353812070 => /root/f304e300ab6643ec8e40082c75a76438.md +2017-07-06 16:10:12: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:12: [1499353812081,"f304e300ab6643ec8e40082c75a76438"] +2017-07-06 16:10:12: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:12: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:12: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:12: stat /root/edf0c71917384fa88ed57407cacd88ef.md +2017-07-06 16:10:12: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local edf0c71917384fa88ed57407cacd88ef, "un") +2017-07-06 16:10:12: put /root/.sync/edf0c71917384fa88ed57407cacd88ef.md_1499353812283 +2017-07-06 16:10:12: setTimestamp /root/.sync/edf0c71917384fa88ed57407cacd88ef.md_1499353812283 +2017-07-06 16:10:12: move /root/.sync/edf0c71917384fa88ed57407cacd88ef.md_1499353812283 => /root/edf0c71917384fa88ed57407cacd88ef.md +2017-07-06 16:10:12: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:12: [1499353812315,"edf0c71917384fa88ed57407cacd88ef"] +2017-07-06 16:10:12: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:12: ["edf0c71917384fa88ed57407cacd88ef"] +2017-07-06 16:10:12: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:12: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:12: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:12: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:12: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:12: SELECT * FROM deleted_items +2017-07-06 16:10:12: list /root +2017-07-06 16:10:12: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:12: ["f304e300ab6643ec8e40082c75a76438"] +2017-07-06 16:10:12: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:12: ["f304e300ab6643ec8e40082c75a76438"] +2017-07-06 16:10:12: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:12: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:12: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:12: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:12: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:12: Synchronization complete [1499353812038]: +2017-07-06 16:10:12: remotesToUpdate: 2 +2017-07-06 16:10:12: remotesToDelete: - +2017-07-06 16:10:12: localsToUdpate: - +2017-07-06 16:10:12: localsToDelete: - +2017-07-06 16:10:12: createLocal: - +2017-07-06 16:10:12: updateLocal: - +2017-07-06 16:10:12: deleteLocal: - +2017-07-06 16:10:12: createRemote: 2 +2017-07-06 16:10:12: updateRemote: - +2017-07-06 16:10:12: deleteRemote: - +2017-07-06 16:10:12: itemConflict: - +2017-07-06 16:10:12: noteConflict: - +2017-07-06 16:10:12: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:12: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:12: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:12: Total folders: 1 +2017-07-06 16:10:12: Total notes: 1 +2017-07-06 16:10:12: Total resources: 0 +2017-07-06 16:10:12: list /root +2017-07-06 16:10:12: stat /root/f304e300ab6643ec8e40082c75a76438.md +2017-07-06 16:10:12: get /root/f304e300ab6643ec8e40082c75a76438.md +2017-07-06 16:10:12: stat /root/edf0c71917384fa88ed57407cacd88ef.md +2017-07-06 16:10:12: get /root/edf0c71917384fa88ed57407cacd88ef.md +2017-07-06 16:10:12: BEGIN TRANSACTION +2017-07-06 16:10:12: DELETE FROM notes +2017-07-06 16:10:12: DELETE FROM folders +2017-07-06 16:10:12: DELETE FROM resources +2017-07-06 16:10:12: DELETE FROM tags +2017-07-06 16:10:12: DELETE FROM note_tags +2017-07-06 16:10:12: COMMIT +2017-07-06 16:10:12: SELECT * FROM settings +2017-07-06 16:10:12: BEGIN TRANSACTION +2017-07-06 16:10:12: DELETE FROM notes +2017-07-06 16:10:12: DELETE FROM folders +2017-07-06 16:10:12: DELETE FROM resources +2017-07-06 16:10:12: DELETE FROM tags +2017-07-06 16:10:12: DELETE FROM note_tags +2017-07-06 16:10:12: COMMIT +2017-07-06 16:10:13: SELECT * FROM settings +2017-07-06 16:10:13: SELECT * FROM settings +2017-07-06 16:10:13: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:13: ["folder1",1499353813403,"2eb20c59615447a8925e8b804509e645",1499353813403] +2017-07-06 16:10:13: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:13: ["2eb20c59615447a8925e8b804509e645","un","joplin","SET_ME",1499353813551,"a864ea087a924f09aaf7bf63e9ac467e",1499353813551] +2017-07-06 16:10:13: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:13: ["a864ea087a924f09aaf7bf63e9ac467e"] +2017-07-06 16:10:13: Starting synchronization... [1499353813778] +2017-07-06 16:10:13: mkdir /root/.sync +2017-07-06 16:10:13: mkdir /root/.resource +2017-07-06 16:10:13: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:13: stat /root/2eb20c59615447a8925e8b804509e645.md +2017-07-06 16:10:13: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 2eb20c59615447a8925e8b804509e645, "folder1") +2017-07-06 16:10:13: put /root/.sync/2eb20c59615447a8925e8b804509e645.md_1499353813807 +2017-07-06 16:10:13: setTimestamp /root/.sync/2eb20c59615447a8925e8b804509e645.md_1499353813807 +2017-07-06 16:10:13: move /root/.sync/2eb20c59615447a8925e8b804509e645.md_1499353813807 => /root/2eb20c59615447a8925e8b804509e645.md +2017-07-06 16:10:13: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:13: [1499353813816,"2eb20c59615447a8925e8b804509e645"] +2017-07-06 16:10:13: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:13: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:13: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:13: stat /root/a864ea087a924f09aaf7bf63e9ac467e.md +2017-07-06 16:10:14: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local a864ea087a924f09aaf7bf63e9ac467e, "un") +2017-07-06 16:10:14: put /root/.sync/a864ea087a924f09aaf7bf63e9ac467e.md_1499353814012 +2017-07-06 16:10:14: setTimestamp /root/.sync/a864ea087a924f09aaf7bf63e9ac467e.md_1499353814012 +2017-07-06 16:10:14: move /root/.sync/a864ea087a924f09aaf7bf63e9ac467e.md_1499353814012 => /root/a864ea087a924f09aaf7bf63e9ac467e.md +2017-07-06 16:10:14: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:14: [1499353814046,"a864ea087a924f09aaf7bf63e9ac467e"] +2017-07-06 16:10:14: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:14: ["a864ea087a924f09aaf7bf63e9ac467e"] +2017-07-06 16:10:14: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:14: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:14: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:14: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:14: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:14: SELECT * FROM deleted_items +2017-07-06 16:10:14: list /root +2017-07-06 16:10:14: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:14: ["2eb20c59615447a8925e8b804509e645"] +2017-07-06 16:10:14: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:14: ["2eb20c59615447a8925e8b804509e645"] +2017-07-06 16:10:14: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:14: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:14: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:14: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:14: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:14: Synchronization complete [1499353813778]: +2017-07-06 16:10:14: remotesToUpdate: 2 +2017-07-06 16:10:14: remotesToDelete: - +2017-07-06 16:10:14: localsToUdpate: - +2017-07-06 16:10:14: localsToDelete: - +2017-07-06 16:10:14: createLocal: - +2017-07-06 16:10:14: updateLocal: - +2017-07-06 16:10:14: deleteLocal: - +2017-07-06 16:10:14: createRemote: 2 +2017-07-06 16:10:14: updateRemote: - +2017-07-06 16:10:14: deleteRemote: - +2017-07-06 16:10:14: itemConflict: - +2017-07-06 16:10:14: noteConflict: - +2017-07-06 16:10:14: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:14: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:14: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:14: Total folders: 1 +2017-07-06 16:10:14: Total notes: 1 +2017-07-06 16:10:14: Total resources: 0 +2017-07-06 16:10:14: UPDATE `notes` SET `title`=?, `updated_time`=? WHERE id=? +2017-07-06 16:10:14: ["un UPDATE",1499353814593,"a864ea087a924f09aaf7bf63e9ac467e"] +2017-07-06 16:10:14: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:14: ["a864ea087a924f09aaf7bf63e9ac467e"] +2017-07-06 16:10:14: SELECT * FROM `folders` +2017-07-06 16:10:14: SELECT * FROM `notes` +2017-07-06 16:10:14: Starting synchronization... [1499353814807] +2017-07-06 16:10:14: mkdir /root/.sync +2017-07-06 16:10:14: mkdir /root/.resource +2017-07-06 16:10:14: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:14: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:14: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:14: stat /root/a864ea087a924f09aaf7bf63e9ac467e.md +2017-07-06 16:10:14: Sync: updateRemote: local has changes: (Local a864ea087a924f09aaf7bf63e9ac467e, "un UPDATE"): (Remote ) +2017-07-06 16:10:14: put /root/.sync/a864ea087a924f09aaf7bf63e9ac467e.md_1499353814866 +2017-07-06 16:10:14: setTimestamp /root/.sync/a864ea087a924f09aaf7bf63e9ac467e.md_1499353814866 +2017-07-06 16:10:14: move /root/.sync/a864ea087a924f09aaf7bf63e9ac467e.md_1499353814866 => /root/a864ea087a924f09aaf7bf63e9ac467e.md +2017-07-06 16:10:14: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:14: [1499353814883,"a864ea087a924f09aaf7bf63e9ac467e"] +2017-07-06 16:10:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:15: ["a864ea087a924f09aaf7bf63e9ac467e"] +2017-07-06 16:10:15: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:15: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:15: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:15: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:15: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:15: SELECT * FROM deleted_items +2017-07-06 16:10:15: list /root +2017-07-06 16:10:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:15: ["2eb20c59615447a8925e8b804509e645"] +2017-07-06 16:10:15: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:15: ["2eb20c59615447a8925e8b804509e645"] +2017-07-06 16:10:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:15: ["a864ea087a924f09aaf7bf63e9ac467e"] +2017-07-06 16:10:15: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:15: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:15: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:15: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:15: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:15: Synchronization complete [1499353814807]: +2017-07-06 16:10:15: remotesToUpdate: 1 +2017-07-06 16:10:15: remotesToDelete: - +2017-07-06 16:10:15: localsToUdpate: - +2017-07-06 16:10:15: localsToDelete: - +2017-07-06 16:10:15: createLocal: - +2017-07-06 16:10:15: updateLocal: - +2017-07-06 16:10:15: deleteLocal: - +2017-07-06 16:10:15: createRemote: - +2017-07-06 16:10:15: updateRemote: 1 +2017-07-06 16:10:15: deleteRemote: - +2017-07-06 16:10:15: itemConflict: - +2017-07-06 16:10:15: noteConflict: - +2017-07-06 16:10:15: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:15: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:15: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:15: Total folders: 1 +2017-07-06 16:10:15: Total notes: 1 +2017-07-06 16:10:15: Total resources: 0 +2017-07-06 16:10:15: list /root +2017-07-06 16:10:15: stat /root/2eb20c59615447a8925e8b804509e645.md +2017-07-06 16:10:15: get /root/2eb20c59615447a8925e8b804509e645.md +2017-07-06 16:10:15: stat /root/a864ea087a924f09aaf7bf63e9ac467e.md +2017-07-06 16:10:15: get /root/a864ea087a924f09aaf7bf63e9ac467e.md +2017-07-06 16:10:15: BEGIN TRANSACTION +2017-07-06 16:10:15: DELETE FROM notes +2017-07-06 16:10:15: DELETE FROM folders +2017-07-06 16:10:15: DELETE FROM resources +2017-07-06 16:10:15: DELETE FROM tags +2017-07-06 16:10:15: DELETE FROM note_tags +2017-07-06 16:10:15: COMMIT +2017-07-06 16:10:15: SELECT * FROM settings +2017-07-06 16:10:15: BEGIN TRANSACTION +2017-07-06 16:10:15: DELETE FROM notes +2017-07-06 16:10:15: DELETE FROM folders +2017-07-06 16:10:15: DELETE FROM resources +2017-07-06 16:10:15: DELETE FROM tags +2017-07-06 16:10:15: DELETE FROM note_tags +2017-07-06 16:10:15: COMMIT +2017-07-06 16:10:15: SELECT * FROM settings +2017-07-06 16:10:16: SELECT * FROM settings +2017-07-06 16:10:16: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:16: ["folder1",1499353816067,"41d06eba6a2b4ebf8c4402e1a28d77fc",1499353816067] +2017-07-06 16:10:16: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:16: ["41d06eba6a2b4ebf8c4402e1a28d77fc","un","joplin","SET_ME",1499353816263,"999161a21eff4838a350c7deb8954cff",1499353816263] +2017-07-06 16:10:16: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:16: ["999161a21eff4838a350c7deb8954cff"] +2017-07-06 16:10:16: Starting synchronization... [1499353816472] +2017-07-06 16:10:16: mkdir /root/.sync +2017-07-06 16:10:16: mkdir /root/.resource +2017-07-06 16:10:16: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:16: stat /root/41d06eba6a2b4ebf8c4402e1a28d77fc.md +2017-07-06 16:10:16: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 41d06eba6a2b4ebf8c4402e1a28d77fc, "folder1") +2017-07-06 16:10:16: put /root/.sync/41d06eba6a2b4ebf8c4402e1a28d77fc.md_1499353816495 +2017-07-06 16:10:16: setTimestamp /root/.sync/41d06eba6a2b4ebf8c4402e1a28d77fc.md_1499353816495 +2017-07-06 16:10:16: move /root/.sync/41d06eba6a2b4ebf8c4402e1a28d77fc.md_1499353816495 => /root/41d06eba6a2b4ebf8c4402e1a28d77fc.md +2017-07-06 16:10:16: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:16: [1499353816505,"41d06eba6a2b4ebf8c4402e1a28d77fc"] +2017-07-06 16:10:17: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:17: stat /root/999161a21eff4838a350c7deb8954cff.md +2017-07-06 16:10:17: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 999161a21eff4838a350c7deb8954cff, "un") +2017-07-06 16:10:17: put /root/.sync/999161a21eff4838a350c7deb8954cff.md_1499353817064 +2017-07-06 16:10:17: setTimestamp /root/.sync/999161a21eff4838a350c7deb8954cff.md_1499353817064 +2017-07-06 16:10:17: move /root/.sync/999161a21eff4838a350c7deb8954cff.md_1499353817064 => /root/999161a21eff4838a350c7deb8954cff.md +2017-07-06 16:10:17: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:17: [1499353817090,"999161a21eff4838a350c7deb8954cff"] +2017-07-06 16:10:17: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:17: ["999161a21eff4838a350c7deb8954cff"] +2017-07-06 16:10:17: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM deleted_items +2017-07-06 16:10:17: list /root +2017-07-06 16:10:17: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:17: ["41d06eba6a2b4ebf8c4402e1a28d77fc"] +2017-07-06 16:10:17: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:17: ["41d06eba6a2b4ebf8c4402e1a28d77fc"] +2017-07-06 16:10:17: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:17: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:17: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:17: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:17: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:17: Synchronization complete [1499353816472]: +2017-07-06 16:10:17: remotesToUpdate: 2 +2017-07-06 16:10:17: remotesToDelete: - +2017-07-06 16:10:17: localsToUdpate: - +2017-07-06 16:10:17: localsToDelete: - +2017-07-06 16:10:17: createLocal: - +2017-07-06 16:10:17: updateLocal: - +2017-07-06 16:10:17: deleteLocal: - +2017-07-06 16:10:17: createRemote: 2 +2017-07-06 16:10:17: updateRemote: - +2017-07-06 16:10:17: deleteRemote: - +2017-07-06 16:10:17: itemConflict: - +2017-07-06 16:10:17: noteConflict: - +2017-07-06 16:10:17: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:17: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:17: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:17: Total folders: 1 +2017-07-06 16:10:17: Total notes: 1 +2017-07-06 16:10:17: Total resources: 0 +2017-07-06 16:10:17: SELECT * FROM settings +2017-07-06 16:10:17: Starting synchronization... [1499353817865] +2017-07-06 16:10:17: mkdir /root/.sync +2017-07-06 16:10:17: mkdir /root/.resource +2017-07-06 16:10:17: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:17: SELECT * FROM deleted_items +2017-07-06 16:10:17: list /root +2017-07-06 16:10:17: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:17: ["41d06eba6a2b4ebf8c4402e1a28d77fc"] +2017-07-06 16:10:17: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:17: ["41d06eba6a2b4ebf8c4402e1a28d77fc"] +2017-07-06 16:10:17: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:17: ["41d06eba6a2b4ebf8c4402e1a28d77fc"] +2017-07-06 16:10:17: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:17: ["41d06eba6a2b4ebf8c4402e1a28d77fc"] +2017-07-06 16:10:17: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:17: ["41d06eba6a2b4ebf8c4402e1a28d77fc"] +2017-07-06 16:10:17: get /root/41d06eba6a2b4ebf8c4402e1a28d77fc.md +2017-07-06 16:10:18: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:18: ["41d06eba6a2b4ebf8c4402e1a28d77fc","folder1","1499353816067","1499353816067",1499353818000] +2017-07-06 16:10:18: Sync: createLocal: remote exists but local does not: (Remote 41d06eba6a2b4ebf8c4402e1a28d77fc, "folder1") +2017-07-06 16:10:18: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:18: ["999161a21eff4838a350c7deb8954cff"] +2017-07-06 16:10:18: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:18: ["999161a21eff4838a350c7deb8954cff"] +2017-07-06 16:10:18: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:18: ["999161a21eff4838a350c7deb8954cff"] +2017-07-06 16:10:18: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:18: ["999161a21eff4838a350c7deb8954cff"] +2017-07-06 16:10:18: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:18: ["999161a21eff4838a350c7deb8954cff"] +2017-07-06 16:10:18: get /root/999161a21eff4838a350c7deb8954cff.md +2017-07-06 16:10:18: INSERT INTO `notes` (`id`, `parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:18: ["999161a21eff4838a350c7deb8954cff","41d06eba6a2b4ebf8c4402e1a28d77fc","un","","1499353816263","1499353816263",1499353818236,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0] +2017-07-06 16:10:18: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:18: ["999161a21eff4838a350c7deb8954cff"] +2017-07-06 16:10:18: Sync: createLocal: remote exists but local does not: (Remote 999161a21eff4838a350c7deb8954cff, "un") +2017-07-06 16:10:18: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:18: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:18: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:18: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:18: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:18: Synchronization complete [1499353817865]: +2017-07-06 16:10:18: remotesToUpdate: - +2017-07-06 16:10:18: remotesToDelete: - +2017-07-06 16:10:18: localsToUdpate: 2 +2017-07-06 16:10:18: localsToDelete: - +2017-07-06 16:10:18: createLocal: 2 +2017-07-06 16:10:18: updateLocal: - +2017-07-06 16:10:18: deleteLocal: - +2017-07-06 16:10:18: createRemote: - +2017-07-06 16:10:18: updateRemote: - +2017-07-06 16:10:18: deleteRemote: - +2017-07-06 16:10:18: itemConflict: - +2017-07-06 16:10:18: noteConflict: - +2017-07-06 16:10:18: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:18: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:18: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:18: Total folders: 1 +2017-07-06 16:10:18: Total notes: 1 +2017-07-06 16:10:18: Total resources: 0 +2017-07-06 16:10:18: SELECT * FROM `folders` +2017-07-06 16:10:18: SELECT * FROM `notes` +2017-07-06 16:10:18: list /root +2017-07-06 16:10:18: stat /root/41d06eba6a2b4ebf8c4402e1a28d77fc.md +2017-07-06 16:10:18: get /root/41d06eba6a2b4ebf8c4402e1a28d77fc.md +2017-07-06 16:10:18: stat /root/999161a21eff4838a350c7deb8954cff.md +2017-07-06 16:10:18: get /root/999161a21eff4838a350c7deb8954cff.md +2017-07-06 16:10:18: BEGIN TRANSACTION +2017-07-06 16:10:18: DELETE FROM notes +2017-07-06 16:10:18: DELETE FROM folders +2017-07-06 16:10:18: DELETE FROM resources +2017-07-06 16:10:18: DELETE FROM tags +2017-07-06 16:10:18: DELETE FROM note_tags +2017-07-06 16:10:18: COMMIT +2017-07-06 16:10:18: SELECT * FROM settings +2017-07-06 16:10:18: BEGIN TRANSACTION +2017-07-06 16:10:18: DELETE FROM notes +2017-07-06 16:10:18: DELETE FROM folders +2017-07-06 16:10:18: DELETE FROM resources +2017-07-06 16:10:18: DELETE FROM tags +2017-07-06 16:10:18: DELETE FROM note_tags +2017-07-06 16:10:18: COMMIT +2017-07-06 16:10:18: SELECT * FROM settings +2017-07-06 16:10:19: SELECT * FROM settings +2017-07-06 16:10:19: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:19: ["folder1",1499353819171,"f09bd5cfabe44476904c29494246ea63",1499353819171] +2017-07-06 16:10:19: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:19: ["f09bd5cfabe44476904c29494246ea63","un","joplin","SET_ME",1499353819320,"f9050697f1e549b5a71170149c30df7e",1499353819320] +2017-07-06 16:10:19: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:19: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:19: Starting synchronization... [1499353819516] +2017-07-06 16:10:19: mkdir /root/.sync +2017-07-06 16:10:19: mkdir /root/.resource +2017-07-06 16:10:19: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:19: stat /root/f09bd5cfabe44476904c29494246ea63.md +2017-07-06 16:10:19: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local f09bd5cfabe44476904c29494246ea63, "folder1") +2017-07-06 16:10:19: put /root/.sync/f09bd5cfabe44476904c29494246ea63.md_1499353819557 +2017-07-06 16:10:19: setTimestamp /root/.sync/f09bd5cfabe44476904c29494246ea63.md_1499353819557 +2017-07-06 16:10:19: move /root/.sync/f09bd5cfabe44476904c29494246ea63.md_1499353819557 => /root/f09bd5cfabe44476904c29494246ea63.md +2017-07-06 16:10:19: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:19: [1499353819575,"f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:19: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:19: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:19: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:19: stat /root/f9050697f1e549b5a71170149c30df7e.md +2017-07-06 16:10:19: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local f9050697f1e549b5a71170149c30df7e, "un") +2017-07-06 16:10:19: put /root/.sync/f9050697f1e549b5a71170149c30df7e.md_1499353819857 +2017-07-06 16:10:19: setTimestamp /root/.sync/f9050697f1e549b5a71170149c30df7e.md_1499353819857 +2017-07-06 16:10:19: move /root/.sync/f9050697f1e549b5a71170149c30df7e.md_1499353819857 => /root/f9050697f1e549b5a71170149c30df7e.md +2017-07-06 16:10:19: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:19: [1499353819867,"f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:20: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:20: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:20: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:20: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:20: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:20: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:20: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:20: SELECT * FROM deleted_items +2017-07-06 16:10:20: list /root +2017-07-06 16:10:20: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:20: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:20: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:20: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:20: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:20: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:20: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:20: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:20: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:20: Synchronization complete [1499353819516]: +2017-07-06 16:10:20: remotesToUpdate: 2 +2017-07-06 16:10:20: remotesToDelete: - +2017-07-06 16:10:20: localsToUdpate: - +2017-07-06 16:10:20: localsToDelete: - +2017-07-06 16:10:20: createLocal: - +2017-07-06 16:10:20: updateLocal: - +2017-07-06 16:10:20: deleteLocal: - +2017-07-06 16:10:20: createRemote: 2 +2017-07-06 16:10:20: updateRemote: - +2017-07-06 16:10:20: deleteRemote: - +2017-07-06 16:10:20: itemConflict: - +2017-07-06 16:10:20: noteConflict: - +2017-07-06 16:10:20: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:20: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:20: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:20: Total folders: 1 +2017-07-06 16:10:20: Total notes: 1 +2017-07-06 16:10:20: Total resources: 0 +2017-07-06 16:10:20: SELECT * FROM settings +2017-07-06 16:10:20: Starting synchronization... [1499353820565] +2017-07-06 16:10:20: mkdir /root/.sync +2017-07-06 16:10:20: mkdir /root/.resource +2017-07-06 16:10:20: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:20: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:20: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:20: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:20: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:20: SELECT * FROM deleted_items +2017-07-06 16:10:20: list /root +2017-07-06 16:10:20: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:20: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:20: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:20: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:20: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:20: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:20: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:20: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:20: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:20: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:20: get /root/f09bd5cfabe44476904c29494246ea63.md +2017-07-06 16:10:20: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:20: ["f09bd5cfabe44476904c29494246ea63","folder1","1499353819171","1499353819171",1499353820643] +2017-07-06 16:10:20: Sync: createLocal: remote exists but local does not: (Remote f09bd5cfabe44476904c29494246ea63, "folder1") +2017-07-06 16:10:20: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:20: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:20: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:20: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:20: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:20: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:20: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:20: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:20: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:20: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:20: get /root/f9050697f1e549b5a71170149c30df7e.md +2017-07-06 16:10:20: INSERT INTO `notes` (`id`, `parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:20: ["f9050697f1e549b5a71170149c30df7e","f09bd5cfabe44476904c29494246ea63","un","","1499353819320","1499353819320",1499353820817,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0] +2017-07-06 16:10:20: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:20: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:20: Sync: createLocal: remote exists but local does not: (Remote f9050697f1e549b5a71170149c30df7e, "un") +2017-07-06 16:10:20: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:20: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:20: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:20: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:20: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:20: Synchronization complete [1499353820565]: +2017-07-06 16:10:20: remotesToUpdate: - +2017-07-06 16:10:20: remotesToDelete: - +2017-07-06 16:10:20: localsToUdpate: 2 +2017-07-06 16:10:20: localsToDelete: - +2017-07-06 16:10:20: createLocal: 2 +2017-07-06 16:10:20: updateLocal: - +2017-07-06 16:10:20: deleteLocal: - +2017-07-06 16:10:20: createRemote: - +2017-07-06 16:10:20: updateRemote: - +2017-07-06 16:10:21: deleteRemote: - +2017-07-06 16:10:21: itemConflict: - +2017-07-06 16:10:21: noteConflict: - +2017-07-06 16:10:21: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:21: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:21: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:21: Total folders: 1 +2017-07-06 16:10:21: Total notes: 1 +2017-07-06 16:10:21: Total resources: 0 +2017-07-06 16:10:21: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:21: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:21: UPDATE `notes` SET `parent_id`=?, `title`=?, `body`=?, `created_time`=?, `updated_time`=?, `sync_time`=?, `is_conflict`=?, `latitude`=?, `longitude`=?, `altitude`=?, `author`=?, `source_url`=?, `is_todo`=?, `todo_due`=?, `todo_completed`=?, `source`=?, `source_application`=?, `application_data`=?, `order`=? WHERE id=? +2017-07-06 16:10:21: ["f09bd5cfabe44476904c29494246ea63","Updated on client 2","",1499353819320,1499353821168,1499353820817,0,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0,"f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:21: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:21: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:21: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:21: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:21: Starting synchronization... [1499353821600] +2017-07-06 16:10:21: mkdir /root/.sync +2017-07-06 16:10:21: mkdir /root/.resource +2017-07-06 16:10:21: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:21: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:21: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:21: stat /root/f9050697f1e549b5a71170149c30df7e.md +2017-07-06 16:10:21: Sync: updateRemote: local has changes: (Local f9050697f1e549b5a71170149c30df7e, "Updated on client 2"): (Remote ) +2017-07-06 16:10:21: put /root/.sync/f9050697f1e549b5a71170149c30df7e.md_1499353821630 +2017-07-06 16:10:21: setTimestamp /root/.sync/f9050697f1e549b5a71170149c30df7e.md_1499353821630 +2017-07-06 16:10:21: move /root/.sync/f9050697f1e549b5a71170149c30df7e.md_1499353821630 => /root/f9050697f1e549b5a71170149c30df7e.md +2017-07-06 16:10:21: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:21: [1499353821641,"f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:21: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:21: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:21: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:21: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:21: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:21: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:21: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:21: SELECT * FROM deleted_items +2017-07-06 16:10:21: list /root +2017-07-06 16:10:21: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:21: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:21: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:21: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:21: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:21: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:21: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:21: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:21: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:21: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:21: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:21: Synchronization complete [1499353821600]: +2017-07-06 16:10:21: remotesToUpdate: 1 +2017-07-06 16:10:21: remotesToDelete: - +2017-07-06 16:10:21: localsToUdpate: - +2017-07-06 16:10:21: localsToDelete: - +2017-07-06 16:10:21: createLocal: - +2017-07-06 16:10:21: updateLocal: - +2017-07-06 16:10:21: deleteLocal: - +2017-07-06 16:10:21: createRemote: - +2017-07-06 16:10:21: updateRemote: 1 +2017-07-06 16:10:21: deleteRemote: - +2017-07-06 16:10:21: itemConflict: - +2017-07-06 16:10:21: noteConflict: - +2017-07-06 16:10:21: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:21: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:21: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:21: Total folders: 1 +2017-07-06 16:10:21: Total notes: 1 +2017-07-06 16:10:21: Total resources: 0 +2017-07-06 16:10:22: SELECT * FROM settings +2017-07-06 16:10:22: Starting synchronization... [1499353822178] +2017-07-06 16:10:22: mkdir /root/.sync +2017-07-06 16:10:22: mkdir /root/.resource +2017-07-06 16:10:22: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:22: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:22: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:22: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:22: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:22: SELECT * FROM deleted_items +2017-07-06 16:10:22: list /root +2017-07-06 16:10:22: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:22: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:22: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:22: ["f09bd5cfabe44476904c29494246ea63"] +2017-07-06 16:10:22: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:22: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:22: get /root/f9050697f1e549b5a71170149c30df7e.md +2017-07-06 16:10:22: UPDATE `notes` SET `parent_id`=?, `title`=?, `body`=?, `created_time`=?, `updated_time`=?, `sync_time`=?, `latitude`=?, `longitude`=?, `altitude`=?, `author`=?, `source_url`=?, `is_todo`=?, `todo_due`=?, `todo_completed`=?, `source`=?, `source_application`=?, `application_data`=?, `order`=? WHERE id=? +2017-07-06 16:10:22: ["f09bd5cfabe44476904c29494246ea63","Updated on client 2","","1499353819320","1499353821168",1499353822291,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0,"f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:22: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:22: ["f9050697f1e549b5a71170149c30df7e"] +2017-07-06 16:10:22: Sync: updateLocal: remote is more recent than local: (Local f9050697f1e549b5a71170149c30df7e, "un"): (Remote f9050697f1e549b5a71170149c30df7e, "Updated on client 2") +2017-07-06 16:10:22: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:22: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:22: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:22: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:22: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:22: Synchronization complete [1499353822178]: +2017-07-06 16:10:22: remotesToUpdate: - +2017-07-06 16:10:22: remotesToDelete: - +2017-07-06 16:10:22: localsToUdpate: 1 +2017-07-06 16:10:22: localsToDelete: - +2017-07-06 16:10:22: createLocal: - +2017-07-06 16:10:22: updateLocal: 1 +2017-07-06 16:10:22: deleteLocal: - +2017-07-06 16:10:22: createRemote: - +2017-07-06 16:10:22: updateRemote: - +2017-07-06 16:10:22: deleteRemote: - +2017-07-06 16:10:22: itemConflict: - +2017-07-06 16:10:22: noteConflict: - +2017-07-06 16:10:22: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:22: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:22: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:22: Total folders: 1 +2017-07-06 16:10:22: Total notes: 1 +2017-07-06 16:10:22: Total resources: 0 +2017-07-06 16:10:22: SELECT * FROM `folders` +2017-07-06 16:10:22: SELECT * FROM `notes` +2017-07-06 16:10:22: list /root +2017-07-06 16:10:22: stat /root/f09bd5cfabe44476904c29494246ea63.md +2017-07-06 16:10:22: get /root/f09bd5cfabe44476904c29494246ea63.md +2017-07-06 16:10:22: stat /root/f9050697f1e549b5a71170149c30df7e.md +2017-07-06 16:10:22: get /root/f9050697f1e549b5a71170149c30df7e.md +2017-07-06 16:10:22: BEGIN TRANSACTION +2017-07-06 16:10:22: DELETE FROM notes +2017-07-06 16:10:22: DELETE FROM folders +2017-07-06 16:10:22: DELETE FROM resources +2017-07-06 16:10:22: DELETE FROM tags +2017-07-06 16:10:22: DELETE FROM note_tags +2017-07-06 16:10:22: COMMIT +2017-07-06 16:10:22: SELECT * FROM settings +2017-07-06 16:10:22: BEGIN TRANSACTION +2017-07-06 16:10:22: DELETE FROM notes +2017-07-06 16:10:22: DELETE FROM folders +2017-07-06 16:10:22: DELETE FROM resources +2017-07-06 16:10:22: DELETE FROM tags +2017-07-06 16:10:22: DELETE FROM note_tags +2017-07-06 16:10:22: COMMIT +2017-07-06 16:10:23: SELECT * FROM settings +2017-07-06 16:10:23: SELECT * FROM settings +2017-07-06 16:10:23: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:23: ["folder1",1499353823329,"e75c9afd2b5649f28e65d2eec193a768",1499353823329] +2017-07-06 16:10:23: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:23: ["e75c9afd2b5649f28e65d2eec193a768","un","joplin","SET_ME",1499353823482,"0d77c510757d4b2bbbd5dadbca27d28d",1499353823482] +2017-07-06 16:10:23: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:23: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:23: Starting synchronization... [1499353823704] +2017-07-06 16:10:23: mkdir /root/.sync +2017-07-06 16:10:23: mkdir /root/.resource +2017-07-06 16:10:23: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:23: stat /root/e75c9afd2b5649f28e65d2eec193a768.md +2017-07-06 16:10:23: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local e75c9afd2b5649f28e65d2eec193a768, "folder1") +2017-07-06 16:10:23: put /root/.sync/e75c9afd2b5649f28e65d2eec193a768.md_1499353823764 +2017-07-06 16:10:23: setTimestamp /root/.sync/e75c9afd2b5649f28e65d2eec193a768.md_1499353823764 +2017-07-06 16:10:23: move /root/.sync/e75c9afd2b5649f28e65d2eec193a768.md_1499353823764 => /root/e75c9afd2b5649f28e65d2eec193a768.md +2017-07-06 16:10:23: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:23: [1499353823791,"e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:24: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:24: stat /root/0d77c510757d4b2bbbd5dadbca27d28d.md +2017-07-06 16:10:24: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 0d77c510757d4b2bbbd5dadbca27d28d, "un") +2017-07-06 16:10:24: put /root/.sync/0d77c510757d4b2bbbd5dadbca27d28d.md_1499353824106 +2017-07-06 16:10:24: setTimestamp /root/.sync/0d77c510757d4b2bbbd5dadbca27d28d.md_1499353824106 +2017-07-06 16:10:24: move /root/.sync/0d77c510757d4b2bbbd5dadbca27d28d.md_1499353824106 => /root/0d77c510757d4b2bbbd5dadbca27d28d.md +2017-07-06 16:10:24: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:24: [1499353824124,"0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:24: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:24: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:24: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM deleted_items +2017-07-06 16:10:24: list /root +2017-07-06 16:10:24: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:24: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:24: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:24: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:24: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:24: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:24: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:24: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:24: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:24: Synchronization complete [1499353823704]: +2017-07-06 16:10:24: remotesToUpdate: 2 +2017-07-06 16:10:24: remotesToDelete: - +2017-07-06 16:10:24: localsToUdpate: - +2017-07-06 16:10:24: localsToDelete: - +2017-07-06 16:10:24: createLocal: - +2017-07-06 16:10:24: updateLocal: - +2017-07-06 16:10:24: deleteLocal: - +2017-07-06 16:10:24: createRemote: 2 +2017-07-06 16:10:24: updateRemote: - +2017-07-06 16:10:24: deleteRemote: - +2017-07-06 16:10:24: itemConflict: - +2017-07-06 16:10:24: noteConflict: - +2017-07-06 16:10:24: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:24: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:24: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:24: Total folders: 1 +2017-07-06 16:10:24: Total notes: 1 +2017-07-06 16:10:24: Total resources: 0 +2017-07-06 16:10:24: SELECT * FROM settings +2017-07-06 16:10:24: Starting synchronization... [1499353824734] +2017-07-06 16:10:24: mkdir /root/.sync +2017-07-06 16:10:24: mkdir /root/.resource +2017-07-06 16:10:24: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:24: SELECT * FROM deleted_items +2017-07-06 16:10:24: list /root +2017-07-06 16:10:24: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:24: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:24: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:24: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:24: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:24: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:24: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:24: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:24: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:24: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:24: get /root/e75c9afd2b5649f28e65d2eec193a768.md +2017-07-06 16:10:24: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:24: ["e75c9afd2b5649f28e65d2eec193a768","folder1","1499353823329","1499353823329",1499353824884] +2017-07-06 16:10:25: Sync: createLocal: remote exists but local does not: (Remote e75c9afd2b5649f28e65d2eec193a768, "folder1") +2017-07-06 16:10:25: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:25: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:25: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:25: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:25: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:25: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:25: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:25: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:25: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:25: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:25: get /root/0d77c510757d4b2bbbd5dadbca27d28d.md +2017-07-06 16:10:25: INSERT INTO `notes` (`id`, `parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:25: ["0d77c510757d4b2bbbd5dadbca27d28d","e75c9afd2b5649f28e65d2eec193a768","un","","1499353823482","1499353823482",1499353825164,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0] +2017-07-06 16:10:25: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:25: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:25: Sync: createLocal: remote exists but local does not: (Remote 0d77c510757d4b2bbbd5dadbca27d28d, "un") +2017-07-06 16:10:25: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:25: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:25: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:25: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:25: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:25: Synchronization complete [1499353824734]: +2017-07-06 16:10:25: remotesToUpdate: - +2017-07-06 16:10:25: remotesToDelete: - +2017-07-06 16:10:25: localsToUdpate: 2 +2017-07-06 16:10:25: localsToDelete: - +2017-07-06 16:10:25: createLocal: 2 +2017-07-06 16:10:25: updateLocal: - +2017-07-06 16:10:25: deleteLocal: - +2017-07-06 16:10:25: createRemote: - +2017-07-06 16:10:25: updateRemote: - +2017-07-06 16:10:25: deleteRemote: - +2017-07-06 16:10:25: itemConflict: - +2017-07-06 16:10:25: noteConflict: - +2017-07-06 16:10:25: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:25: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:25: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:25: Total folders: 1 +2017-07-06 16:10:25: Total notes: 1 +2017-07-06 16:10:25: Total resources: 0 +2017-07-06 16:10:25: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:25: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:25: UPDATE `notes` SET `parent_id`=?, `title`=?, `body`=?, `created_time`=?, `updated_time`=?, `sync_time`=?, `is_conflict`=?, `latitude`=?, `longitude`=?, `altitude`=?, `author`=?, `source_url`=?, `is_todo`=?, `todo_due`=?, `todo_completed`=?, `source`=?, `source_application`=?, `application_data`=?, `order`=? WHERE id=? +2017-07-06 16:10:25: ["e75c9afd2b5649f28e65d2eec193a768","Updated on client 2","",1499353823482,1499353825822,1499353825164,0,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0,"0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:26: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:26: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:26: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:26: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:26: Starting synchronization... [1499353826067] +2017-07-06 16:10:26: mkdir /root/.sync +2017-07-06 16:10:26: mkdir /root/.resource +2017-07-06 16:10:26: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:26: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:26: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:26: stat /root/0d77c510757d4b2bbbd5dadbca27d28d.md +2017-07-06 16:10:26: Sync: updateRemote: local has changes: (Local 0d77c510757d4b2bbbd5dadbca27d28d, "Updated on client 2"): (Remote ) +2017-07-06 16:10:26: put /root/.sync/0d77c510757d4b2bbbd5dadbca27d28d.md_1499353826109 +2017-07-06 16:10:26: setTimestamp /root/.sync/0d77c510757d4b2bbbd5dadbca27d28d.md_1499353826109 +2017-07-06 16:10:26: move /root/.sync/0d77c510757d4b2bbbd5dadbca27d28d.md_1499353826109 => /root/0d77c510757d4b2bbbd5dadbca27d28d.md +2017-07-06 16:10:26: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:26: [1499353826123,"0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:26: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:26: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:26: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:26: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:26: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:26: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:26: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:26: SELECT * FROM deleted_items +2017-07-06 16:10:26: list /root +2017-07-06 16:10:26: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:26: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:26: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:26: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:26: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:26: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:26: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:26: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:26: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:26: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:26: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:26: Synchronization complete [1499353826067]: +2017-07-06 16:10:26: remotesToUpdate: 1 +2017-07-06 16:10:26: remotesToDelete: - +2017-07-06 16:10:26: localsToUdpate: - +2017-07-06 16:10:26: localsToDelete: - +2017-07-06 16:10:26: createLocal: - +2017-07-06 16:10:26: updateLocal: - +2017-07-06 16:10:26: deleteLocal: - +2017-07-06 16:10:26: createRemote: - +2017-07-06 16:10:26: updateRemote: 1 +2017-07-06 16:10:26: deleteRemote: - +2017-07-06 16:10:26: itemConflict: - +2017-07-06 16:10:26: noteConflict: - +2017-07-06 16:10:26: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:26: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:26: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:26: Total folders: 1 +2017-07-06 16:10:26: Total notes: 1 +2017-07-06 16:10:26: Total resources: 0 +2017-07-06 16:10:26: SELECT * FROM settings +2017-07-06 16:10:26: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:26: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:26: UPDATE `notes` SET `parent_id`=?, `title`=?, `body`=?, `created_time`=?, `updated_time`=?, `sync_time`=?, `is_conflict`=?, `latitude`=?, `longitude`=?, `altitude`=?, `author`=?, `source_url`=?, `is_todo`=?, `todo_due`=?, `todo_completed`=?, `source`=?, `source_application`=?, `application_data`=?, `order`=? WHERE id=? +2017-07-06 16:10:26: ["e75c9afd2b5649f28e65d2eec193a768","Updated on client 1","",1499353823482,1499353826858,1499353824124,0,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0,"0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:27: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:27: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:27: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:27: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:27: Starting synchronization... [1499353827101] +2017-07-06 16:10:27: mkdir /root/.sync +2017-07-06 16:10:27: mkdir /root/.resource +2017-07-06 16:10:27: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:27: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:27: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:27: stat /root/0d77c510757d4b2bbbd5dadbca27d28d.md +2017-07-06 16:10:27: Sync: noteConflict: both remote and local have changes: (Local 0d77c510757d4b2bbbd5dadbca27d28d, "Updated on client 1"): (Remote ) +2017-07-06 16:10:27: INSERT INTO `notes` (`parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `is_conflict`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`, `id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:27: ["e75c9afd2b5649f28e65d2eec193a768","Updated on client 1","",1499353823482,1499353826858,1499353824124,1,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0,"079da6c71c544c2fb362a129e1e78214"] +2017-07-06 16:10:27: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:27: ["079da6c71c544c2fb362a129e1e78214"] +2017-07-06 16:10:27: get /root/0d77c510757d4b2bbbd5dadbca27d28d.md +2017-07-06 16:10:27: UPDATE `notes` SET `parent_id`=?, `title`=?, `body`=?, `created_time`=?, `updated_time`=?, `sync_time`=?, `latitude`=?, `longitude`=?, `altitude`=?, `author`=?, `source_url`=?, `is_todo`=?, `todo_due`=?, `todo_completed`=?, `source`=?, `source_application`=?, `application_data`=?, `order`=? WHERE id=? +2017-07-06 16:10:27: ["e75c9afd2b5649f28e65d2eec193a768","Updated on client 2","","1499353823482","1499353825822",1499353827368,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0,"0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:27: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:27: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:27: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:27: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:27: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:27: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:27: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:27: SELECT * FROM deleted_items +2017-07-06 16:10:27: list /root +2017-07-06 16:10:27: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:27: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:27: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:27: ["e75c9afd2b5649f28e65d2eec193a768"] +2017-07-06 16:10:27: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:27: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:27: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:27: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:27: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:27: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:27: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:27: Synchronization complete [1499353827101]: +2017-07-06 16:10:27: remotesToUpdate: 1 +2017-07-06 16:10:27: remotesToDelete: - +2017-07-06 16:10:27: localsToUdpate: - +2017-07-06 16:10:27: localsToDelete: - +2017-07-06 16:10:27: createLocal: - +2017-07-06 16:10:27: updateLocal: - +2017-07-06 16:10:27: deleteLocal: - +2017-07-06 16:10:27: createRemote: - +2017-07-06 16:10:27: updateRemote: - +2017-07-06 16:10:27: deleteRemote: - +2017-07-06 16:10:27: itemConflict: - +2017-07-06 16:10:27: noteConflict: 1 +2017-07-06 16:10:27: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:27: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:27: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:27: Total folders: 1 +2017-07-06 16:10:27: Total notes: 2 +2017-07-06 16:10:27: Total resources: 0 +2017-07-06 16:10:27: SELECT * FROM notes WHERE is_conflict = 1 +2017-07-06 16:10:27: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:27: ["0d77c510757d4b2bbbd5dadbca27d28d"] +2017-07-06 16:10:27: BEGIN TRANSACTION +2017-07-06 16:10:27: DELETE FROM notes +2017-07-06 16:10:27: DELETE FROM folders +2017-07-06 16:10:27: DELETE FROM resources +2017-07-06 16:10:27: DELETE FROM tags +2017-07-06 16:10:27: DELETE FROM note_tags +2017-07-06 16:10:27: COMMIT +2017-07-06 16:10:27: SELECT * FROM settings +2017-07-06 16:10:27: BEGIN TRANSACTION +2017-07-06 16:10:27: DELETE FROM notes +2017-07-06 16:10:27: DELETE FROM folders +2017-07-06 16:10:27: DELETE FROM resources +2017-07-06 16:10:27: DELETE FROM tags +2017-07-06 16:10:27: DELETE FROM note_tags +2017-07-06 16:10:27: COMMIT +2017-07-06 16:10:28: SELECT * FROM settings +2017-07-06 16:10:28: SELECT * FROM settings +2017-07-06 16:10:28: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:28: ["folder1",1499353828354,"a74a68cb3a2f4e5f96e9babd898ba0c4",1499353828354] +2017-07-06 16:10:28: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:28: ["a74a68cb3a2f4e5f96e9babd898ba0c4","un","joplin","SET_ME",1499353828593,"0dd299d5869741f18e583135f76a0a37",1499353828594] +2017-07-06 16:10:28: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:28: ["0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:28: Starting synchronization... [1499353828791] +2017-07-06 16:10:28: mkdir /root/.sync +2017-07-06 16:10:28: mkdir /root/.resource +2017-07-06 16:10:28: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:28: stat /root/a74a68cb3a2f4e5f96e9babd898ba0c4.md +2017-07-06 16:10:28: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local a74a68cb3a2f4e5f96e9babd898ba0c4, "folder1") +2017-07-06 16:10:28: put /root/.sync/a74a68cb3a2f4e5f96e9babd898ba0c4.md_1499353828837 +2017-07-06 16:10:28: setTimestamp /root/.sync/a74a68cb3a2f4e5f96e9babd898ba0c4.md_1499353828837 +2017-07-06 16:10:28: move /root/.sync/a74a68cb3a2f4e5f96e9babd898ba0c4.md_1499353828837 => /root/a74a68cb3a2f4e5f96e9babd898ba0c4.md +2017-07-06 16:10:28: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:28: [1499353828859,"a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:29: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:29: stat /root/0dd299d5869741f18e583135f76a0a37.md +2017-07-06 16:10:29: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 0dd299d5869741f18e583135f76a0a37, "un") +2017-07-06 16:10:29: put /root/.sync/0dd299d5869741f18e583135f76a0a37.md_1499353829169 +2017-07-06 16:10:29: setTimestamp /root/.sync/0dd299d5869741f18e583135f76a0a37.md_1499353829169 +2017-07-06 16:10:29: move /root/.sync/0dd299d5869741f18e583135f76a0a37.md_1499353829169 => /root/0dd299d5869741f18e583135f76a0a37.md +2017-07-06 16:10:29: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:29: [1499353829201,"0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:29: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:29: ["0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:29: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM deleted_items +2017-07-06 16:10:29: list /root +2017-07-06 16:10:29: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:29: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:29: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:29: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:29: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:29: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:29: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:29: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:29: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:29: Synchronization complete [1499353828791]: +2017-07-06 16:10:29: remotesToUpdate: 2 +2017-07-06 16:10:29: remotesToDelete: - +2017-07-06 16:10:29: localsToUdpate: - +2017-07-06 16:10:29: localsToDelete: - +2017-07-06 16:10:29: createLocal: - +2017-07-06 16:10:29: updateLocal: - +2017-07-06 16:10:29: deleteLocal: - +2017-07-06 16:10:29: createRemote: 2 +2017-07-06 16:10:29: updateRemote: - +2017-07-06 16:10:29: deleteRemote: - +2017-07-06 16:10:29: itemConflict: - +2017-07-06 16:10:29: noteConflict: - +2017-07-06 16:10:29: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:29: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:29: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:29: Total folders: 1 +2017-07-06 16:10:29: Total notes: 1 +2017-07-06 16:10:29: Total resources: 0 +2017-07-06 16:10:29: SELECT * FROM settings +2017-07-06 16:10:29: Starting synchronization... [1499353829761] +2017-07-06 16:10:29: mkdir /root/.sync +2017-07-06 16:10:29: mkdir /root/.resource +2017-07-06 16:10:29: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:29: SELECT * FROM deleted_items +2017-07-06 16:10:29: list /root +2017-07-06 16:10:29: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:29: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:29: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:29: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:29: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:29: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:29: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:29: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:29: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:29: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:29: get /root/a74a68cb3a2f4e5f96e9babd898ba0c4.md +2017-07-06 16:10:29: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:29: ["a74a68cb3a2f4e5f96e9babd898ba0c4","folder1","1499353828354","1499353828354",1499353829945] +2017-07-06 16:10:30: Sync: createLocal: remote exists but local does not: (Remote a74a68cb3a2f4e5f96e9babd898ba0c4, "folder1") +2017-07-06 16:10:30: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:30: ["0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:30: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:30: ["0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:30: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:30: ["0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:30: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:30: ["0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:30: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:30: ["0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:30: get /root/0dd299d5869741f18e583135f76a0a37.md +2017-07-06 16:10:30: INSERT INTO `notes` (`id`, `parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:30: ["0dd299d5869741f18e583135f76a0a37","a74a68cb3a2f4e5f96e9babd898ba0c4","un","","1499353828594","1499353828593",1499353830210,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0] +2017-07-06 16:10:30: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:30: ["0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:30: Sync: createLocal: remote exists but local does not: (Remote 0dd299d5869741f18e583135f76a0a37, "un") +2017-07-06 16:10:30: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:30: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:30: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:30: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:30: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:30: Synchronization complete [1499353829761]: +2017-07-06 16:10:30: remotesToUpdate: - +2017-07-06 16:10:30: remotesToDelete: - +2017-07-06 16:10:30: localsToUdpate: 2 +2017-07-06 16:10:30: localsToDelete: - +2017-07-06 16:10:30: createLocal: 2 +2017-07-06 16:10:30: updateLocal: - +2017-07-06 16:10:30: deleteLocal: - +2017-07-06 16:10:30: createRemote: - +2017-07-06 16:10:30: updateRemote: - +2017-07-06 16:10:30: deleteRemote: - +2017-07-06 16:10:30: itemConflict: - +2017-07-06 16:10:30: noteConflict: - +2017-07-06 16:10:30: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:30: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:30: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:30: Total folders: 1 +2017-07-06 16:10:30: Total notes: 1 +2017-07-06 16:10:30: Total resources: 0 +2017-07-06 16:10:30: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:30: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:30: UPDATE `folders` SET `parent_id`=?, `title`=?, `created_time`=?, `updated_time`=?, `sync_time`=? WHERE id=? +2017-07-06 16:10:30: ["","folder1 UPDATE CLIENT 2",1499353828354,1499353830758,1499353829945,"a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:30: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:30: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:31: Starting synchronization... [1499353831015] +2017-07-06 16:10:31: mkdir /root/.sync +2017-07-06 16:10:31: mkdir /root/.resource +2017-07-06 16:10:31: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:31: stat /root/a74a68cb3a2f4e5f96e9babd898ba0c4.md +2017-07-06 16:10:31: Sync: updateRemote: local has changes: (Local a74a68cb3a2f4e5f96e9babd898ba0c4, "folder1 UPDATE CLIENT 2"): (Remote ) +2017-07-06 16:10:31: put /root/.sync/a74a68cb3a2f4e5f96e9babd898ba0c4.md_1499353831062 +2017-07-06 16:10:31: setTimestamp /root/.sync/a74a68cb3a2f4e5f96e9babd898ba0c4.md_1499353831062 +2017-07-06 16:10:31: move /root/.sync/a74a68cb3a2f4e5f96e9babd898ba0c4.md_1499353831062 => /root/a74a68cb3a2f4e5f96e9babd898ba0c4.md +2017-07-06 16:10:31: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:31: [1499353831078,"a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:31: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:31: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:31: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:31: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:31: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:31: SELECT * FROM deleted_items +2017-07-06 16:10:31: list /root +2017-07-06 16:10:31: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:31: ["0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:31: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:31: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:31: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:31: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:31: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:31: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:31: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:31: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:31: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:31: Synchronization complete [1499353831015]: +2017-07-06 16:10:31: remotesToUpdate: 1 +2017-07-06 16:10:31: remotesToDelete: - +2017-07-06 16:10:31: localsToUdpate: - +2017-07-06 16:10:31: localsToDelete: - +2017-07-06 16:10:31: createLocal: - +2017-07-06 16:10:31: updateLocal: - +2017-07-06 16:10:31: deleteLocal: - +2017-07-06 16:10:31: createRemote: - +2017-07-06 16:10:31: updateRemote: 1 +2017-07-06 16:10:31: deleteRemote: - +2017-07-06 16:10:31: itemConflict: - +2017-07-06 16:10:31: noteConflict: - +2017-07-06 16:10:31: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:31: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:31: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:31: Total folders: 1 +2017-07-06 16:10:31: Total notes: 1 +2017-07-06 16:10:31: Total resources: 0 +2017-07-06 16:10:31: SELECT * FROM settings +2017-07-06 16:10:31: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:31: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:31: UPDATE `folders` SET `parent_id`=?, `title`=?, `created_time`=?, `updated_time`=?, `sync_time`=? WHERE id=? +2017-07-06 16:10:31: ["","folder1 UPDATE CLIENT 1",1499353828354,1499353831847,1499353828859,"a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:32: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:32: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:32: Starting synchronization... [1499353832103] +2017-07-06 16:10:32: mkdir /root/.sync +2017-07-06 16:10:32: mkdir /root/.resource +2017-07-06 16:10:32: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:32: stat /root/a74a68cb3a2f4e5f96e9babd898ba0c4.md +2017-07-06 16:10:32: Sync: itemConflict: both remote and local have changes: (Local a74a68cb3a2f4e5f96e9babd898ba0c4, "folder1 UPDATE CLIENT 1"): (Remote ) +2017-07-06 16:10:32: get /root/a74a68cb3a2f4e5f96e9babd898ba0c4.md +2017-07-06 16:10:32: UPDATE `folders` SET `title`=?, `created_time`=?, `updated_time`=?, `sync_time`=? WHERE id=? +2017-07-06 16:10:32: ["folder1 UPDATE CLIENT 2","1499353828354","1499353830758",1499353832157,"a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:32: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:32: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:32: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:32: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:32: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:32: SELECT * FROM deleted_items +2017-07-06 16:10:32: list /root +2017-07-06 16:10:32: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:32: ["0dd299d5869741f18e583135f76a0a37"] +2017-07-06 16:10:32: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:32: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:32: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:32: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:32: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:32: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:32: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:32: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:32: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:32: Synchronization complete [1499353832103]: +2017-07-06 16:10:32: remotesToUpdate: 1 +2017-07-06 16:10:32: remotesToDelete: - +2017-07-06 16:10:32: localsToUdpate: - +2017-07-06 16:10:32: localsToDelete: - +2017-07-06 16:10:32: createLocal: - +2017-07-06 16:10:32: updateLocal: - +2017-07-06 16:10:32: deleteLocal: - +2017-07-06 16:10:32: createRemote: - +2017-07-06 16:10:32: updateRemote: - +2017-07-06 16:10:32: deleteRemote: - +2017-07-06 16:10:32: itemConflict: 1 +2017-07-06 16:10:32: noteConflict: - +2017-07-06 16:10:32: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:32: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:32: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:32: Total folders: 1 +2017-07-06 16:10:32: Total notes: 1 +2017-07-06 16:10:32: Total resources: 0 +2017-07-06 16:10:32: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:32: ["a74a68cb3a2f4e5f96e9babd898ba0c4"] +2017-07-06 16:10:32: BEGIN TRANSACTION +2017-07-06 16:10:32: DELETE FROM notes +2017-07-06 16:10:32: DELETE FROM folders +2017-07-06 16:10:32: DELETE FROM resources +2017-07-06 16:10:32: DELETE FROM tags +2017-07-06 16:10:32: DELETE FROM note_tags +2017-07-06 16:10:32: COMMIT +2017-07-06 16:10:32: SELECT * FROM settings +2017-07-06 16:10:32: BEGIN TRANSACTION +2017-07-06 16:10:32: DELETE FROM notes +2017-07-06 16:10:32: DELETE FROM folders +2017-07-06 16:10:32: DELETE FROM resources +2017-07-06 16:10:32: DELETE FROM tags +2017-07-06 16:10:32: DELETE FROM note_tags +2017-07-06 16:10:32: COMMIT +2017-07-06 16:10:33: SELECT * FROM settings +2017-07-06 16:10:33: SELECT * FROM settings +2017-07-06 16:10:33: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:33: ["folder1",1499353833342,"c943179875d04a40bfd54e7eea0369ad",1499353833342] +2017-07-06 16:10:33: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:33: ["c943179875d04a40bfd54e7eea0369ad","un","joplin","SET_ME",1499353833589,"32ab769cf63446b4b7d045d8c990ff26",1499353833589] +2017-07-06 16:10:33: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:33: ["32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:33: Starting synchronization... [1499353833783] +2017-07-06 16:10:33: mkdir /root/.sync +2017-07-06 16:10:33: mkdir /root/.resource +2017-07-06 16:10:33: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:33: stat /root/c943179875d04a40bfd54e7eea0369ad.md +2017-07-06 16:10:33: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local c943179875d04a40bfd54e7eea0369ad, "folder1") +2017-07-06 16:10:33: put /root/.sync/c943179875d04a40bfd54e7eea0369ad.md_1499353833815 +2017-07-06 16:10:33: setTimestamp /root/.sync/c943179875d04a40bfd54e7eea0369ad.md_1499353833815 +2017-07-06 16:10:33: move /root/.sync/c943179875d04a40bfd54e7eea0369ad.md_1499353833815 => /root/c943179875d04a40bfd54e7eea0369ad.md +2017-07-06 16:10:33: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:33: [1499353833832,"c943179875d04a40bfd54e7eea0369ad"] +2017-07-06 16:10:34: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:34: stat /root/32ab769cf63446b4b7d045d8c990ff26.md +2017-07-06 16:10:34: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 32ab769cf63446b4b7d045d8c990ff26, "un") +2017-07-06 16:10:34: put /root/.sync/32ab769cf63446b4b7d045d8c990ff26.md_1499353834077 +2017-07-06 16:10:34: setTimestamp /root/.sync/32ab769cf63446b4b7d045d8c990ff26.md_1499353834077 +2017-07-06 16:10:34: move /root/.sync/32ab769cf63446b4b7d045d8c990ff26.md_1499353834077 => /root/32ab769cf63446b4b7d045d8c990ff26.md +2017-07-06 16:10:34: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:34: [1499353834115,"32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:34: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:34: ["32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:34: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM deleted_items +2017-07-06 16:10:34: list /root +2017-07-06 16:10:34: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:34: ["c943179875d04a40bfd54e7eea0369ad"] +2017-07-06 16:10:34: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:34: ["c943179875d04a40bfd54e7eea0369ad"] +2017-07-06 16:10:34: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:34: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:34: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:34: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:34: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:34: Synchronization complete [1499353833783]: +2017-07-06 16:10:34: remotesToUpdate: 2 +2017-07-06 16:10:34: remotesToDelete: - +2017-07-06 16:10:34: localsToUdpate: - +2017-07-06 16:10:34: localsToDelete: - +2017-07-06 16:10:34: createLocal: - +2017-07-06 16:10:34: updateLocal: - +2017-07-06 16:10:34: deleteLocal: - +2017-07-06 16:10:34: createRemote: 2 +2017-07-06 16:10:34: updateRemote: - +2017-07-06 16:10:34: deleteRemote: - +2017-07-06 16:10:34: itemConflict: - +2017-07-06 16:10:34: noteConflict: - +2017-07-06 16:10:34: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:34: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:34: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:34: Total folders: 1 +2017-07-06 16:10:34: Total notes: 1 +2017-07-06 16:10:34: Total resources: 0 +2017-07-06 16:10:34: SELECT * FROM settings +2017-07-06 16:10:34: Starting synchronization... [1499353834662] +2017-07-06 16:10:34: mkdir /root/.sync +2017-07-06 16:10:34: mkdir /root/.resource +2017-07-06 16:10:34: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:34: SELECT * FROM deleted_items +2017-07-06 16:10:34: list /root +2017-07-06 16:10:34: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:34: ["c943179875d04a40bfd54e7eea0369ad"] +2017-07-06 16:10:34: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:34: ["c943179875d04a40bfd54e7eea0369ad"] +2017-07-06 16:10:34: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:34: ["c943179875d04a40bfd54e7eea0369ad"] +2017-07-06 16:10:34: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:34: ["c943179875d04a40bfd54e7eea0369ad"] +2017-07-06 16:10:34: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:34: ["c943179875d04a40bfd54e7eea0369ad"] +2017-07-06 16:10:34: get /root/c943179875d04a40bfd54e7eea0369ad.md +2017-07-06 16:10:34: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:34: ["c943179875d04a40bfd54e7eea0369ad","folder1","1499353833342","1499353833342",1499353834767] +2017-07-06 16:10:35: Sync: createLocal: remote exists but local does not: (Remote c943179875d04a40bfd54e7eea0369ad, "folder1") +2017-07-06 16:10:35: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:35: ["32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:35: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:35: ["32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:35: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:35: ["32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:35: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:35: ["32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:35: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:35: ["32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:35: get /root/32ab769cf63446b4b7d045d8c990ff26.md +2017-07-06 16:10:35: INSERT INTO `notes` (`id`, `parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:35: ["32ab769cf63446b4b7d045d8c990ff26","c943179875d04a40bfd54e7eea0369ad","un","","1499353833589","1499353833589",1499353835121,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0] +2017-07-06 16:10:35: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:35: ["32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:35: Sync: createLocal: remote exists but local does not: (Remote 32ab769cf63446b4b7d045d8c990ff26, "un") +2017-07-06 16:10:35: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:35: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:35: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:35: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:35: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:35: Synchronization complete [1499353834662]: +2017-07-06 16:10:35: remotesToUpdate: - +2017-07-06 16:10:35: remotesToDelete: - +2017-07-06 16:10:35: localsToUdpate: 2 +2017-07-06 16:10:35: localsToDelete: - +2017-07-06 16:10:35: createLocal: 2 +2017-07-06 16:10:35: updateLocal: - +2017-07-06 16:10:35: deleteLocal: - +2017-07-06 16:10:35: createRemote: - +2017-07-06 16:10:35: updateRemote: - +2017-07-06 16:10:35: deleteRemote: - +2017-07-06 16:10:35: itemConflict: - +2017-07-06 16:10:35: noteConflict: - +2017-07-06 16:10:35: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:35: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:35: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:35: Total folders: 1 +2017-07-06 16:10:35: Total notes: 1 +2017-07-06 16:10:35: Total resources: 0 +2017-07-06 16:10:35: DELETE FROM notes WHERE id = ? +2017-07-06 16:10:35: ["32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:35: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:10:35: [1,"32ab769cf63446b4b7d045d8c990ff26",1499353835775] +2017-07-06 16:10:35: Starting synchronization... [1499353835967] +2017-07-06 16:10:35: mkdir /root/.sync +2017-07-06 16:10:35: mkdir /root/.resource +2017-07-06 16:10:36: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:36: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:36: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:36: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:36: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:36: SELECT * FROM deleted_items +2017-07-06 16:10:36: Sync: deleteRemote: local has been deleted: (Remote 32ab769cf63446b4b7d045d8c990ff26) +2017-07-06 16:10:36: delete /root/32ab769cf63446b4b7d045d8c990ff26.md +2017-07-06 16:10:36: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:10:36: ["32ab769cf63446b4b7d045d8c990ff26"] +2017-07-06 16:10:36: list /root +2017-07-06 16:10:36: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:36: ["c943179875d04a40bfd54e7eea0369ad"] +2017-07-06 16:10:36: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:36: ["c943179875d04a40bfd54e7eea0369ad"] +2017-07-06 16:10:36: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:36: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:36: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:36: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:36: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:36: Synchronization complete [1499353835967]: +2017-07-06 16:10:36: remotesToUpdate: - +2017-07-06 16:10:36: remotesToDelete: 1 +2017-07-06 16:10:36: localsToUdpate: - +2017-07-06 16:10:36: localsToDelete: - +2017-07-06 16:10:36: createLocal: - +2017-07-06 16:10:36: updateLocal: - +2017-07-06 16:10:36: deleteLocal: - +2017-07-06 16:10:36: createRemote: - +2017-07-06 16:10:36: updateRemote: - +2017-07-06 16:10:36: deleteRemote: 1 +2017-07-06 16:10:36: itemConflict: - +2017-07-06 16:10:36: noteConflict: - +2017-07-06 16:10:36: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:36: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:36: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:36: Total folders: 1 +2017-07-06 16:10:36: Total notes: 0 +2017-07-06 16:10:36: Total resources: 0 +2017-07-06 16:10:36: list /root +2017-07-06 16:10:36: SELECT * FROM deleted_items +2017-07-06 16:10:36: BEGIN TRANSACTION +2017-07-06 16:10:36: DELETE FROM notes +2017-07-06 16:10:36: DELETE FROM folders +2017-07-06 16:10:36: DELETE FROM resources +2017-07-06 16:10:36: DELETE FROM tags +2017-07-06 16:10:36: DELETE FROM note_tags +2017-07-06 16:10:36: COMMIT +2017-07-06 16:10:36: SELECT * FROM settings +2017-07-06 16:10:36: BEGIN TRANSACTION +2017-07-06 16:10:36: DELETE FROM notes +2017-07-06 16:10:36: DELETE FROM folders +2017-07-06 16:10:36: DELETE FROM resources +2017-07-06 16:10:36: DELETE FROM tags +2017-07-06 16:10:36: DELETE FROM note_tags +2017-07-06 16:10:36: COMMIT +2017-07-06 16:10:36: SELECT * FROM settings +2017-07-06 16:10:37: SELECT * FROM settings +2017-07-06 16:10:37: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:37: ["folder1",1499353837209,"72f00c1c2c94487d830c9b6f1b7a3d0d",1499353837209] +2017-07-06 16:10:37: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:37: ["72f00c1c2c94487d830c9b6f1b7a3d0d","un","joplin","SET_ME",1499353837386,"b8fedc43a6954d598262031a433199ab",1499353837386] +2017-07-06 16:10:37: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:37: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:37: Starting synchronization... [1499353837693] +2017-07-06 16:10:37: mkdir /root/.sync +2017-07-06 16:10:37: mkdir /root/.resource +2017-07-06 16:10:37: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:37: stat /root/72f00c1c2c94487d830c9b6f1b7a3d0d.md +2017-07-06 16:10:37: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 72f00c1c2c94487d830c9b6f1b7a3d0d, "folder1") +2017-07-06 16:10:37: put /root/.sync/72f00c1c2c94487d830c9b6f1b7a3d0d.md_1499353837743 +2017-07-06 16:10:37: setTimestamp /root/.sync/72f00c1c2c94487d830c9b6f1b7a3d0d.md_1499353837743 +2017-07-06 16:10:37: move /root/.sync/72f00c1c2c94487d830c9b6f1b7a3d0d.md_1499353837743 => /root/72f00c1c2c94487d830c9b6f1b7a3d0d.md +2017-07-06 16:10:37: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:37: [1499353837753,"72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:37: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:37: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:37: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:37: stat /root/b8fedc43a6954d598262031a433199ab.md +2017-07-06 16:10:37: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local b8fedc43a6954d598262031a433199ab, "un") +2017-07-06 16:10:37: put /root/.sync/b8fedc43a6954d598262031a433199ab.md_1499353837933 +2017-07-06 16:10:37: setTimestamp /root/.sync/b8fedc43a6954d598262031a433199ab.md_1499353837933 +2017-07-06 16:10:37: move /root/.sync/b8fedc43a6954d598262031a433199ab.md_1499353837933 => /root/b8fedc43a6954d598262031a433199ab.md +2017-07-06 16:10:37: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:37: [1499353837959,"b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:38: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:38: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:38: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:38: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:38: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:38: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:38: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:38: SELECT * FROM deleted_items +2017-07-06 16:10:38: list /root +2017-07-06 16:10:38: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:38: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:38: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:38: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:38: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:38: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:38: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:38: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:38: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:38: Synchronization complete [1499353837693]: +2017-07-06 16:10:38: remotesToUpdate: 2 +2017-07-06 16:10:38: remotesToDelete: - +2017-07-06 16:10:38: localsToUdpate: - +2017-07-06 16:10:38: localsToDelete: - +2017-07-06 16:10:38: createLocal: - +2017-07-06 16:10:38: updateLocal: - +2017-07-06 16:10:38: deleteLocal: - +2017-07-06 16:10:38: createRemote: 2 +2017-07-06 16:10:38: updateRemote: - +2017-07-06 16:10:38: deleteRemote: - +2017-07-06 16:10:38: itemConflict: - +2017-07-06 16:10:38: noteConflict: - +2017-07-06 16:10:38: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:38: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:38: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:38: Total folders: 1 +2017-07-06 16:10:38: Total notes: 1 +2017-07-06 16:10:38: Total resources: 0 +2017-07-06 16:10:38: SELECT * FROM settings +2017-07-06 16:10:38: Starting synchronization... [1499353838547] +2017-07-06 16:10:38: mkdir /root/.sync +2017-07-06 16:10:38: mkdir /root/.resource +2017-07-06 16:10:38: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:38: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:38: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:38: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:38: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:38: SELECT * FROM deleted_items +2017-07-06 16:10:38: list /root +2017-07-06 16:10:38: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:38: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:38: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:38: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:38: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:38: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:38: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:38: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:38: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:38: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:38: get /root/72f00c1c2c94487d830c9b6f1b7a3d0d.md +2017-07-06 16:10:38: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:38: ["72f00c1c2c94487d830c9b6f1b7a3d0d","folder1","1499353837209","1499353837209",1499353838687] +2017-07-06 16:10:38: Sync: createLocal: remote exists but local does not: (Remote 72f00c1c2c94487d830c9b6f1b7a3d0d, "folder1") +2017-07-06 16:10:38: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:38: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:38: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:38: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:38: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:38: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:38: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:38: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:38: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:38: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:38: get /root/b8fedc43a6954d598262031a433199ab.md +2017-07-06 16:10:38: INSERT INTO `notes` (`id`, `parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:38: ["b8fedc43a6954d598262031a433199ab","72f00c1c2c94487d830c9b6f1b7a3d0d","un","","1499353837386","1499353837386",1499353838961,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0] +2017-07-06 16:10:39: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:39: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:39: Sync: createLocal: remote exists but local does not: (Remote b8fedc43a6954d598262031a433199ab, "un") +2017-07-06 16:10:39: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:39: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:39: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:39: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:39: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:39: Synchronization complete [1499353838547]: +2017-07-06 16:10:39: remotesToUpdate: - +2017-07-06 16:10:39: remotesToDelete: - +2017-07-06 16:10:39: localsToUdpate: 2 +2017-07-06 16:10:39: localsToDelete: - +2017-07-06 16:10:39: createLocal: 2 +2017-07-06 16:10:39: updateLocal: - +2017-07-06 16:10:39: deleteLocal: - +2017-07-06 16:10:39: createRemote: - +2017-07-06 16:10:39: updateRemote: - +2017-07-06 16:10:39: deleteRemote: - +2017-07-06 16:10:39: itemConflict: - +2017-07-06 16:10:39: noteConflict: - +2017-07-06 16:10:39: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:39: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:39: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:39: Total folders: 1 +2017-07-06 16:10:39: Total notes: 1 +2017-07-06 16:10:39: Total resources: 0 +2017-07-06 16:10:39: DELETE FROM notes WHERE id = ? +2017-07-06 16:10:39: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:39: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:10:39: [1,"b8fedc43a6954d598262031a433199ab",1499353839587] +2017-07-06 16:10:39: Starting synchronization... [1499353839736] +2017-07-06 16:10:39: mkdir /root/.sync +2017-07-06 16:10:39: mkdir /root/.resource +2017-07-06 16:10:39: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:39: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:39: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:39: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:39: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:39: SELECT * FROM deleted_items +2017-07-06 16:10:39: Sync: deleteRemote: local has been deleted: (Remote b8fedc43a6954d598262031a433199ab) +2017-07-06 16:10:39: delete /root/b8fedc43a6954d598262031a433199ab.md +2017-07-06 16:10:39: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:10:39: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:39: list /root +2017-07-06 16:10:39: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:40: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:40: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:40: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:40: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:40: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:40: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:40: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:40: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:40: Synchronization complete [1499353839736]: +2017-07-06 16:10:40: remotesToUpdate: - +2017-07-06 16:10:40: remotesToDelete: 1 +2017-07-06 16:10:40: localsToUdpate: - +2017-07-06 16:10:40: localsToDelete: - +2017-07-06 16:10:40: createLocal: - +2017-07-06 16:10:40: updateLocal: - +2017-07-06 16:10:40: deleteLocal: - +2017-07-06 16:10:40: createRemote: - +2017-07-06 16:10:40: updateRemote: - +2017-07-06 16:10:40: deleteRemote: 1 +2017-07-06 16:10:40: itemConflict: - +2017-07-06 16:10:40: noteConflict: - +2017-07-06 16:10:40: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:40: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:40: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:40: Total folders: 1 +2017-07-06 16:10:40: Total notes: 0 +2017-07-06 16:10:40: Total resources: 0 +2017-07-06 16:10:40: SELECT * FROM settings +2017-07-06 16:10:40: Starting synchronization... [1499353840453] +2017-07-06 16:10:40: mkdir /root/.sync +2017-07-06 16:10:40: mkdir /root/.resource +2017-07-06 16:10:40: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:40: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:40: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:40: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:40: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:40: SELECT * FROM deleted_items +2017-07-06 16:10:40: list /root +2017-07-06 16:10:40: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:40: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:40: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:40: ["72f00c1c2c94487d830c9b6f1b7a3d0d"] +2017-07-06 16:10:40: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:40: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:40: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:40: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:40: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:40: Sync: deleteLocal: remote has been deleted: (Local b8fedc43a6954d598262031a433199ab) +2017-07-06 16:10:40: DELETE FROM notes WHERE id = ? +2017-07-06 16:10:40: ["b8fedc43a6954d598262031a433199ab"] +2017-07-06 16:10:40: Synchronization complete [1499353840453]: +2017-07-06 16:10:40: remotesToUpdate: - +2017-07-06 16:10:40: remotesToDelete: - +2017-07-06 16:10:40: localsToUdpate: - +2017-07-06 16:10:40: localsToDelete: 1 +2017-07-06 16:10:40: createLocal: - +2017-07-06 16:10:40: updateLocal: - +2017-07-06 16:10:40: deleteLocal: 1 +2017-07-06 16:10:40: createRemote: - +2017-07-06 16:10:40: updateRemote: - +2017-07-06 16:10:40: deleteRemote: - +2017-07-06 16:10:40: itemConflict: - +2017-07-06 16:10:40: noteConflict: - +2017-07-06 16:10:40: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:40: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:40: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:40: Total folders: 1 +2017-07-06 16:10:40: Total notes: 0 +2017-07-06 16:10:40: Total resources: 0 +2017-07-06 16:10:40: SELECT * FROM `folders` +2017-07-06 16:10:40: SELECT * FROM `notes` +2017-07-06 16:10:40: SELECT * FROM deleted_items +2017-07-06 16:10:40: BEGIN TRANSACTION +2017-07-06 16:10:40: DELETE FROM notes +2017-07-06 16:10:40: DELETE FROM folders +2017-07-06 16:10:40: DELETE FROM resources +2017-07-06 16:10:40: DELETE FROM tags +2017-07-06 16:10:40: DELETE FROM note_tags +2017-07-06 16:10:40: COMMIT +2017-07-06 16:10:41: SELECT * FROM settings +2017-07-06 16:10:41: BEGIN TRANSACTION +2017-07-06 16:10:41: DELETE FROM notes +2017-07-06 16:10:41: DELETE FROM folders +2017-07-06 16:10:41: DELETE FROM resources +2017-07-06 16:10:41: DELETE FROM tags +2017-07-06 16:10:41: DELETE FROM note_tags +2017-07-06 16:10:41: COMMIT +2017-07-06 16:10:41: SELECT * FROM settings +2017-07-06 16:10:41: SELECT * FROM settings +2017-07-06 16:10:41: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:41: ["folder1",1499353841534,"e706474b6a8b4fec90d904b80b004464",1499353841534] +2017-07-06 16:10:41: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:41: ["folder2",1499353841795,"fc991848f8ba4231aa947683045af7eb",1499353841795] +2017-07-06 16:10:42: Starting synchronization... [1499353842002] +2017-07-06 16:10:42: mkdir /root/.sync +2017-07-06 16:10:42: mkdir /root/.resource +2017-07-06 16:10:42: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:42: stat /root/e706474b6a8b4fec90d904b80b004464.md +2017-07-06 16:10:42: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local e706474b6a8b4fec90d904b80b004464, "folder1") +2017-07-06 16:10:42: put /root/.sync/e706474b6a8b4fec90d904b80b004464.md_1499353842075 +2017-07-06 16:10:42: setTimestamp /root/.sync/e706474b6a8b4fec90d904b80b004464.md_1499353842075 +2017-07-06 16:10:42: move /root/.sync/e706474b6a8b4fec90d904b80b004464.md_1499353842075 => /root/e706474b6a8b4fec90d904b80b004464.md +2017-07-06 16:10:42: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:42: [1499353842092,"e706474b6a8b4fec90d904b80b004464"] +2017-07-06 16:10:42: stat /root/fc991848f8ba4231aa947683045af7eb.md +2017-07-06 16:10:42: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local fc991848f8ba4231aa947683045af7eb, "folder2") +2017-07-06 16:10:42: put /root/.sync/fc991848f8ba4231aa947683045af7eb.md_1499353842237 +2017-07-06 16:10:42: setTimestamp /root/.sync/fc991848f8ba4231aa947683045af7eb.md_1499353842237 +2017-07-06 16:10:42: move /root/.sync/fc991848f8ba4231aa947683045af7eb.md_1499353842237 => /root/fc991848f8ba4231aa947683045af7eb.md +2017-07-06 16:10:42: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:42: [1499353842258,"fc991848f8ba4231aa947683045af7eb"] +2017-07-06 16:10:42: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:42: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:42: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:42: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:42: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:42: SELECT * FROM deleted_items +2017-07-06 16:10:42: list /root +2017-07-06 16:10:42: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:42: ["e706474b6a8b4fec90d904b80b004464"] +2017-07-06 16:10:42: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:42: ["e706474b6a8b4fec90d904b80b004464"] +2017-07-06 16:10:42: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:42: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:42: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:42: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:42: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:42: Synchronization complete [1499353842002]: +2017-07-06 16:10:42: remotesToUpdate: 2 +2017-07-06 16:10:42: remotesToDelete: - +2017-07-06 16:10:42: localsToUdpate: - +2017-07-06 16:10:42: localsToDelete: - +2017-07-06 16:10:42: createLocal: - +2017-07-06 16:10:42: updateLocal: - +2017-07-06 16:10:42: deleteLocal: - +2017-07-06 16:10:42: createRemote: 2 +2017-07-06 16:10:42: updateRemote: - +2017-07-06 16:10:42: deleteRemote: - +2017-07-06 16:10:42: itemConflict: - +2017-07-06 16:10:42: noteConflict: - +2017-07-06 16:10:42: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:42: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:42: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:42: Total folders: 2 +2017-07-06 16:10:42: Total notes: 0 +2017-07-06 16:10:42: Total resources: 0 +2017-07-06 16:10:42: SELECT * FROM settings +2017-07-06 16:10:42: Starting synchronization... [1499353842846] +2017-07-06 16:10:42: mkdir /root/.sync +2017-07-06 16:10:42: mkdir /root/.resource +2017-07-06 16:10:42: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:42: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:42: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:42: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:42: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:42: SELECT * FROM deleted_items +2017-07-06 16:10:42: list /root +2017-07-06 16:10:42: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:42: ["e706474b6a8b4fec90d904b80b004464"] +2017-07-06 16:10:42: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:42: ["e706474b6a8b4fec90d904b80b004464"] +2017-07-06 16:10:42: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:42: ["e706474b6a8b4fec90d904b80b004464"] +2017-07-06 16:10:42: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:42: ["e706474b6a8b4fec90d904b80b004464"] +2017-07-06 16:10:42: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:42: ["e706474b6a8b4fec90d904b80b004464"] +2017-07-06 16:10:42: get /root/e706474b6a8b4fec90d904b80b004464.md +2017-07-06 16:10:42: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:42: ["e706474b6a8b4fec90d904b80b004464","folder1","1499353841534","1499353841534",1499353842970] +2017-07-06 16:10:43: Sync: createLocal: remote exists but local does not: (Remote e706474b6a8b4fec90d904b80b004464, "folder1") +2017-07-06 16:10:43: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:43: ["fc991848f8ba4231aa947683045af7eb"] +2017-07-06 16:10:43: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:43: ["fc991848f8ba4231aa947683045af7eb"] +2017-07-06 16:10:43: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:43: ["fc991848f8ba4231aa947683045af7eb"] +2017-07-06 16:10:43: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:43: ["fc991848f8ba4231aa947683045af7eb"] +2017-07-06 16:10:43: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:43: ["fc991848f8ba4231aa947683045af7eb"] +2017-07-06 16:10:43: get /root/fc991848f8ba4231aa947683045af7eb.md +2017-07-06 16:10:43: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:43: ["fc991848f8ba4231aa947683045af7eb","folder2","1499353841795","1499353841795",1499353843307] +2017-07-06 16:10:43: Sync: createLocal: remote exists but local does not: (Remote fc991848f8ba4231aa947683045af7eb, "folder2") +2017-07-06 16:10:43: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:43: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:43: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:43: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:43: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:43: Synchronization complete [1499353842846]: +2017-07-06 16:10:43: remotesToUpdate: - +2017-07-06 16:10:43: remotesToDelete: - +2017-07-06 16:10:43: localsToUdpate: 2 +2017-07-06 16:10:43: localsToDelete: - +2017-07-06 16:10:43: createLocal: 2 +2017-07-06 16:10:43: updateLocal: - +2017-07-06 16:10:43: deleteLocal: - +2017-07-06 16:10:43: createRemote: - +2017-07-06 16:10:43: updateRemote: - +2017-07-06 16:10:43: deleteRemote: - +2017-07-06 16:10:43: itemConflict: - +2017-07-06 16:10:43: noteConflict: - +2017-07-06 16:10:43: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:43: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:43: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:43: Total folders: 2 +2017-07-06 16:10:43: Total notes: 0 +2017-07-06 16:10:43: Total resources: 0 +2017-07-06 16:10:43: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:43: ["fc991848f8ba4231aa947683045af7eb"] +2017-07-06 16:10:43: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ? +2017-07-06 16:10:43: ["fc991848f8ba4231aa947683045af7eb"] +2017-07-06 16:10:43: DELETE FROM folders WHERE id = ? +2017-07-06 16:10:43: ["fc991848f8ba4231aa947683045af7eb"] +2017-07-06 16:10:43: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:10:43: [2,"fc991848f8ba4231aa947683045af7eb",1499353843984] +2017-07-06 16:10:44: Starting synchronization... [1499353844160] +2017-07-06 16:10:44: mkdir /root/.sync +2017-07-06 16:10:44: mkdir /root/.resource +2017-07-06 16:10:44: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:44: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:44: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:44: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:44: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:44: SELECT * FROM deleted_items +2017-07-06 16:10:44: Sync: deleteRemote: local has been deleted: (Remote fc991848f8ba4231aa947683045af7eb) +2017-07-06 16:10:44: delete /root/fc991848f8ba4231aa947683045af7eb.md +2017-07-06 16:10:44: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:10:44: ["fc991848f8ba4231aa947683045af7eb"] +2017-07-06 16:10:44: list /root +2017-07-06 16:10:44: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:44: ["e706474b6a8b4fec90d904b80b004464"] +2017-07-06 16:10:44: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:44: ["e706474b6a8b4fec90d904b80b004464"] +2017-07-06 16:10:44: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:44: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:44: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:44: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:44: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:44: Synchronization complete [1499353844160]: +2017-07-06 16:10:44: remotesToUpdate: - +2017-07-06 16:10:44: remotesToDelete: 1 +2017-07-06 16:10:44: localsToUdpate: - +2017-07-06 16:10:44: localsToDelete: - +2017-07-06 16:10:44: createLocal: - +2017-07-06 16:10:44: updateLocal: - +2017-07-06 16:10:44: deleteLocal: - +2017-07-06 16:10:44: createRemote: - +2017-07-06 16:10:44: updateRemote: - +2017-07-06 16:10:44: deleteRemote: 1 +2017-07-06 16:10:44: itemConflict: - +2017-07-06 16:10:44: noteConflict: - +2017-07-06 16:10:44: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:44: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:44: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:44: Total folders: 1 +2017-07-06 16:10:44: Total notes: 0 +2017-07-06 16:10:44: Total resources: 0 +2017-07-06 16:10:44: SELECT * FROM `folders` +2017-07-06 16:10:44: SELECT * FROM `notes` +2017-07-06 16:10:44: list /root +2017-07-06 16:10:44: stat /root/e706474b6a8b4fec90d904b80b004464.md +2017-07-06 16:10:44: get /root/e706474b6a8b4fec90d904b80b004464.md +2017-07-06 16:10:44: BEGIN TRANSACTION +2017-07-06 16:10:44: DELETE FROM notes +2017-07-06 16:10:44: DELETE FROM folders +2017-07-06 16:10:44: DELETE FROM resources +2017-07-06 16:10:44: DELETE FROM tags +2017-07-06 16:10:44: DELETE FROM note_tags +2017-07-06 16:10:44: COMMIT +2017-07-06 16:10:44: SELECT * FROM settings +2017-07-06 16:10:44: BEGIN TRANSACTION +2017-07-06 16:10:44: DELETE FROM notes +2017-07-06 16:10:44: DELETE FROM folders +2017-07-06 16:10:44: DELETE FROM resources +2017-07-06 16:10:44: DELETE FROM tags +2017-07-06 16:10:44: DELETE FROM note_tags +2017-07-06 16:10:44: COMMIT +2017-07-06 16:10:45: SELECT * FROM settings +2017-07-06 16:10:45: SELECT * FROM settings +2017-07-06 16:10:45: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:45: ["folder1",1499353845276,"2fe1a62b441149359dc7cf205cf5605e",1499353845276] +2017-07-06 16:10:45: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:45: ["folder2",1499353845488,"01d0def5a8294386b25eb6cf45a8e18b",1499353845488] +2017-07-06 16:10:45: Starting synchronization... [1499353845638] +2017-07-06 16:10:45: mkdir /root/.sync +2017-07-06 16:10:45: mkdir /root/.resource +2017-07-06 16:10:45: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:45: stat /root/2fe1a62b441149359dc7cf205cf5605e.md +2017-07-06 16:10:45: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 2fe1a62b441149359dc7cf205cf5605e, "folder1") +2017-07-06 16:10:45: put /root/.sync/2fe1a62b441149359dc7cf205cf5605e.md_1499353845671 +2017-07-06 16:10:45: setTimestamp /root/.sync/2fe1a62b441149359dc7cf205cf5605e.md_1499353845671 +2017-07-06 16:10:45: move /root/.sync/2fe1a62b441149359dc7cf205cf5605e.md_1499353845671 => /root/2fe1a62b441149359dc7cf205cf5605e.md +2017-07-06 16:10:45: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:45: [1499353845680,"2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:45: stat /root/01d0def5a8294386b25eb6cf45a8e18b.md +2017-07-06 16:10:45: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 01d0def5a8294386b25eb6cf45a8e18b, "folder2") +2017-07-06 16:10:45: put /root/.sync/01d0def5a8294386b25eb6cf45a8e18b.md_1499353845835 +2017-07-06 16:10:45: setTimestamp /root/.sync/01d0def5a8294386b25eb6cf45a8e18b.md_1499353845835 +2017-07-06 16:10:45: move /root/.sync/01d0def5a8294386b25eb6cf45a8e18b.md_1499353845835 => /root/01d0def5a8294386b25eb6cf45a8e18b.md +2017-07-06 16:10:45: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:45: [1499353845868,"01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:46: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:46: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:46: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:46: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:46: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:46: SELECT * FROM deleted_items +2017-07-06 16:10:46: list /root +2017-07-06 16:10:46: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:46: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:46: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:46: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:46: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:46: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:46: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:46: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:46: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:46: Synchronization complete [1499353845638]: +2017-07-06 16:10:46: remotesToUpdate: 2 +2017-07-06 16:10:46: remotesToDelete: - +2017-07-06 16:10:46: localsToUdpate: - +2017-07-06 16:10:46: localsToDelete: - +2017-07-06 16:10:46: createLocal: - +2017-07-06 16:10:46: updateLocal: - +2017-07-06 16:10:46: deleteLocal: - +2017-07-06 16:10:46: createRemote: 2 +2017-07-06 16:10:46: updateRemote: - +2017-07-06 16:10:46: deleteRemote: - +2017-07-06 16:10:46: itemConflict: - +2017-07-06 16:10:46: noteConflict: - +2017-07-06 16:10:46: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:46: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:46: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:46: Total folders: 2 +2017-07-06 16:10:46: Total notes: 0 +2017-07-06 16:10:46: Total resources: 0 +2017-07-06 16:10:46: SELECT * FROM settings +2017-07-06 16:10:46: Starting synchronization... [1499353846402] +2017-07-06 16:10:46: mkdir /root/.sync +2017-07-06 16:10:46: mkdir /root/.resource +2017-07-06 16:10:46: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:46: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:46: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:46: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:46: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:46: SELECT * FROM deleted_items +2017-07-06 16:10:46: list /root +2017-07-06 16:10:46: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:46: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:46: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:46: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:46: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:46: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:46: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:46: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:46: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:46: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:46: get /root/2fe1a62b441149359dc7cf205cf5605e.md +2017-07-06 16:10:46: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:46: ["2fe1a62b441149359dc7cf205cf5605e","folder1","1499353845276","1499353845276",1499353846594] +2017-07-06 16:10:46: Sync: createLocal: remote exists but local does not: (Remote 2fe1a62b441149359dc7cf205cf5605e, "folder1") +2017-07-06 16:10:46: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:46: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:46: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:46: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:46: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:46: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:46: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:46: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:46: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:46: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:46: get /root/01d0def5a8294386b25eb6cf45a8e18b.md +2017-07-06 16:10:46: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:46: ["01d0def5a8294386b25eb6cf45a8e18b","folder2","1499353845488","1499353845488",1499353846977] +2017-07-06 16:10:47: Sync: createLocal: remote exists but local does not: (Remote 01d0def5a8294386b25eb6cf45a8e18b, "folder2") +2017-07-06 16:10:47: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:47: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:47: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:47: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:47: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:47: Synchronization complete [1499353846402]: +2017-07-06 16:10:47: remotesToUpdate: - +2017-07-06 16:10:47: remotesToDelete: - +2017-07-06 16:10:47: localsToUdpate: 2 +2017-07-06 16:10:47: localsToDelete: - +2017-07-06 16:10:47: createLocal: 2 +2017-07-06 16:10:47: updateLocal: - +2017-07-06 16:10:47: deleteLocal: - +2017-07-06 16:10:47: createRemote: - +2017-07-06 16:10:47: updateRemote: - +2017-07-06 16:10:47: deleteRemote: - +2017-07-06 16:10:47: itemConflict: - +2017-07-06 16:10:47: noteConflict: - +2017-07-06 16:10:47: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:47: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:47: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:47: Total folders: 2 +2017-07-06 16:10:47: Total notes: 0 +2017-07-06 16:10:47: Total resources: 0 +2017-07-06 16:10:47: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:47: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:47: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ? +2017-07-06 16:10:47: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:47: DELETE FROM folders WHERE id = ? +2017-07-06 16:10:47: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:47: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:10:47: [2,"01d0def5a8294386b25eb6cf45a8e18b",1499353847718] +2017-07-06 16:10:47: Starting synchronization... [1499353847885] +2017-07-06 16:10:47: mkdir /root/.sync +2017-07-06 16:10:47: mkdir /root/.resource +2017-07-06 16:10:47: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:47: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:47: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:47: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:47: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:47: SELECT * FROM deleted_items +2017-07-06 16:10:47: Sync: deleteRemote: local has been deleted: (Remote 01d0def5a8294386b25eb6cf45a8e18b) +2017-07-06 16:10:47: delete /root/01d0def5a8294386b25eb6cf45a8e18b.md +2017-07-06 16:10:47: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:10:47: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:48: list /root +2017-07-06 16:10:48: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:48: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:48: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:48: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:48: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:48: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:48: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:48: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:48: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:48: Synchronization complete [1499353847885]: +2017-07-06 16:10:48: remotesToUpdate: - +2017-07-06 16:10:48: remotesToDelete: 1 +2017-07-06 16:10:48: localsToUdpate: - +2017-07-06 16:10:48: localsToDelete: - +2017-07-06 16:10:48: createLocal: - +2017-07-06 16:10:48: updateLocal: - +2017-07-06 16:10:48: deleteLocal: - +2017-07-06 16:10:48: createRemote: - +2017-07-06 16:10:48: updateRemote: - +2017-07-06 16:10:48: deleteRemote: 1 +2017-07-06 16:10:48: itemConflict: - +2017-07-06 16:10:48: noteConflict: - +2017-07-06 16:10:48: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:48: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:48: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:48: Total folders: 1 +2017-07-06 16:10:48: Total notes: 0 +2017-07-06 16:10:48: Total resources: 0 +2017-07-06 16:10:48: SELECT * FROM settings +2017-07-06 16:10:48: Starting synchronization... [1499353848544] +2017-07-06 16:10:48: mkdir /root/.sync +2017-07-06 16:10:48: mkdir /root/.resource +2017-07-06 16:10:48: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:48: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:48: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:48: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:48: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:48: SELECT * FROM deleted_items +2017-07-06 16:10:48: list /root +2017-07-06 16:10:48: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:48: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:48: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:48: ["2fe1a62b441149359dc7cf205cf5605e"] +2017-07-06 16:10:48: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:48: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:48: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:48: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:48: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:48: Sync: deleteLocal: remote has been deleted: (Local 01d0def5a8294386b25eb6cf45a8e18b) +2017-07-06 16:10:48: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:48: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:48: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ? +2017-07-06 16:10:48: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:48: DELETE FROM folders WHERE id = ? +2017-07-06 16:10:48: ["01d0def5a8294386b25eb6cf45a8e18b"] +2017-07-06 16:10:48: Synchronization complete [1499353848544]: +2017-07-06 16:10:48: remotesToUpdate: - +2017-07-06 16:10:48: remotesToDelete: - +2017-07-06 16:10:48: localsToUdpate: - +2017-07-06 16:10:48: localsToDelete: 1 +2017-07-06 16:10:48: createLocal: - +2017-07-06 16:10:48: updateLocal: - +2017-07-06 16:10:48: deleteLocal: 1 +2017-07-06 16:10:48: createRemote: - +2017-07-06 16:10:48: updateRemote: - +2017-07-06 16:10:48: deleteRemote: - +2017-07-06 16:10:48: itemConflict: - +2017-07-06 16:10:48: noteConflict: - +2017-07-06 16:10:48: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:48: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:48: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:48: Total folders: 1 +2017-07-06 16:10:48: Total notes: 0 +2017-07-06 16:10:48: Total resources: 0 +2017-07-06 16:10:48: SELECT * FROM `folders` +2017-07-06 16:10:48: SELECT * FROM `notes` +2017-07-06 16:10:48: list /root +2017-07-06 16:10:48: stat /root/2fe1a62b441149359dc7cf205cf5605e.md +2017-07-06 16:10:48: get /root/2fe1a62b441149359dc7cf205cf5605e.md +2017-07-06 16:10:48: BEGIN TRANSACTION +2017-07-06 16:10:48: DELETE FROM notes +2017-07-06 16:10:48: DELETE FROM folders +2017-07-06 16:10:48: DELETE FROM resources +2017-07-06 16:10:48: DELETE FROM tags +2017-07-06 16:10:49: DELETE FROM note_tags +2017-07-06 16:10:49: COMMIT +2017-07-06 16:10:49: SELECT * FROM settings +2017-07-06 16:10:49: BEGIN TRANSACTION +2017-07-06 16:10:49: DELETE FROM notes +2017-07-06 16:10:49: DELETE FROM folders +2017-07-06 16:10:49: DELETE FROM resources +2017-07-06 16:10:49: DELETE FROM tags +2017-07-06 16:10:49: DELETE FROM note_tags +2017-07-06 16:10:49: COMMIT +2017-07-06 16:10:49: SELECT * FROM settings +2017-07-06 16:10:49: SELECT * FROM settings +2017-07-06 16:10:49: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:49: ["folder1",1499353849646,"f5eed5c313904cdab4d571d77e536d66",1499353849646] +2017-07-06 16:10:49: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:49: ["folder2",1499353849944,"7f626f5290d5432e8d108f80ed8e4a44",1499353849944] +2017-07-06 16:10:50: Starting synchronization... [1499353850222] +2017-07-06 16:10:50: mkdir /root/.sync +2017-07-06 16:10:50: mkdir /root/.resource +2017-07-06 16:10:50: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:50: stat /root/f5eed5c313904cdab4d571d77e536d66.md +2017-07-06 16:10:50: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local f5eed5c313904cdab4d571d77e536d66, "folder1") +2017-07-06 16:10:50: put /root/.sync/f5eed5c313904cdab4d571d77e536d66.md_1499353850250 +2017-07-06 16:10:50: setTimestamp /root/.sync/f5eed5c313904cdab4d571d77e536d66.md_1499353850250 +2017-07-06 16:10:50: move /root/.sync/f5eed5c313904cdab4d571d77e536d66.md_1499353850250 => /root/f5eed5c313904cdab4d571d77e536d66.md +2017-07-06 16:10:50: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:50: [1499353850265,"f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:50: stat /root/7f626f5290d5432e8d108f80ed8e4a44.md +2017-07-06 16:10:50: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 7f626f5290d5432e8d108f80ed8e4a44, "folder2") +2017-07-06 16:10:50: put /root/.sync/7f626f5290d5432e8d108f80ed8e4a44.md_1499353850431 +2017-07-06 16:10:50: setTimestamp /root/.sync/7f626f5290d5432e8d108f80ed8e4a44.md_1499353850431 +2017-07-06 16:10:50: move /root/.sync/7f626f5290d5432e8d108f80ed8e4a44.md_1499353850431 => /root/7f626f5290d5432e8d108f80ed8e4a44.md +2017-07-06 16:10:50: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:50: [1499353850448,"7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:50: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:50: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:50: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:50: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:50: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:50: SELECT * FROM deleted_items +2017-07-06 16:10:50: list /root +2017-07-06 16:10:50: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:50: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:50: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:50: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:50: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:50: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:50: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:50: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:50: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:50: Synchronization complete [1499353850222]: +2017-07-06 16:10:50: remotesToUpdate: 2 +2017-07-06 16:10:50: remotesToDelete: - +2017-07-06 16:10:50: localsToUdpate: - +2017-07-06 16:10:50: localsToDelete: - +2017-07-06 16:10:50: createLocal: - +2017-07-06 16:10:50: updateLocal: - +2017-07-06 16:10:50: deleteLocal: - +2017-07-06 16:10:50: createRemote: 2 +2017-07-06 16:10:50: updateRemote: - +2017-07-06 16:10:50: deleteRemote: - +2017-07-06 16:10:50: itemConflict: - +2017-07-06 16:10:50: noteConflict: - +2017-07-06 16:10:50: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:50: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:50: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:50: Total folders: 2 +2017-07-06 16:10:50: Total notes: 0 +2017-07-06 16:10:50: Total resources: 0 +2017-07-06 16:10:51: SELECT * FROM settings +2017-07-06 16:10:51: Starting synchronization... [1499353851027] +2017-07-06 16:10:51: mkdir /root/.sync +2017-07-06 16:10:51: mkdir /root/.resource +2017-07-06 16:10:51: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:51: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:51: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:51: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:51: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:51: SELECT * FROM deleted_items +2017-07-06 16:10:51: list /root +2017-07-06 16:10:51: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:51: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:51: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:51: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:51: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:51: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:51: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:51: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:51: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:51: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:51: get /root/f5eed5c313904cdab4d571d77e536d66.md +2017-07-06 16:10:51: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:51: ["f5eed5c313904cdab4d571d77e536d66","folder1","1499353849646","1499353849646",1499353851149] +2017-07-06 16:10:51: Sync: createLocal: remote exists but local does not: (Remote f5eed5c313904cdab4d571d77e536d66, "folder1") +2017-07-06 16:10:51: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:51: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:51: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:51: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:51: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:51: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:51: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:51: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:51: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:51: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:51: get /root/7f626f5290d5432e8d108f80ed8e4a44.md +2017-07-06 16:10:51: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:51: ["7f626f5290d5432e8d108f80ed8e4a44","folder2","1499353849944","1499353849944",1499353851335] +2017-07-06 16:10:51: Sync: createLocal: remote exists but local does not: (Remote 7f626f5290d5432e8d108f80ed8e4a44, "folder2") +2017-07-06 16:10:51: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:51: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:51: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:51: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:51: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:51: Synchronization complete [1499353851027]: +2017-07-06 16:10:51: remotesToUpdate: - +2017-07-06 16:10:51: remotesToDelete: - +2017-07-06 16:10:51: localsToUdpate: 2 +2017-07-06 16:10:51: localsToDelete: - +2017-07-06 16:10:51: createLocal: 2 +2017-07-06 16:10:51: updateLocal: - +2017-07-06 16:10:51: deleteLocal: - +2017-07-06 16:10:51: createRemote: - +2017-07-06 16:10:51: updateRemote: - +2017-07-06 16:10:51: deleteRemote: - +2017-07-06 16:10:51: itemConflict: - +2017-07-06 16:10:51: noteConflict: - +2017-07-06 16:10:51: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:51: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:51: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:51: Total folders: 2 +2017-07-06 16:10:51: Total notes: 0 +2017-07-06 16:10:51: Total resources: 0 +2017-07-06 16:10:51: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:51: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:51: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ? +2017-07-06 16:10:51: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:51: DELETE FROM folders WHERE id = ? +2017-07-06 16:10:51: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:51: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:10:51: [2,"f5eed5c313904cdab4d571d77e536d66",1499353851869] +2017-07-06 16:10:52: SELECT * FROM settings +2017-07-06 16:10:52: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:52: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:52: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ? +2017-07-06 16:10:52: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:52: DELETE FROM folders WHERE id = ? +2017-07-06 16:10:52: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:52: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:10:52: [2,"7f626f5290d5432e8d108f80ed8e4a44",1499353852468] +2017-07-06 16:10:52: Starting synchronization... [1499353852640] +2017-07-06 16:10:52: mkdir /root/.sync +2017-07-06 16:10:52: mkdir /root/.resource +2017-07-06 16:10:52: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:52: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:52: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:52: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:52: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:52: SELECT * FROM deleted_items +2017-07-06 16:10:52: Sync: deleteRemote: local has been deleted: (Remote 7f626f5290d5432e8d108f80ed8e4a44) +2017-07-06 16:10:52: delete /root/7f626f5290d5432e8d108f80ed8e4a44.md +2017-07-06 16:10:52: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:10:52: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:52: list /root +2017-07-06 16:10:52: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:52: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:52: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:52: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:52: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:52: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:52: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:52: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:52: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:52: Synchronization complete [1499353852640]: +2017-07-06 16:10:52: remotesToUpdate: - +2017-07-06 16:10:52: remotesToDelete: 1 +2017-07-06 16:10:52: localsToUdpate: - +2017-07-06 16:10:52: localsToDelete: - +2017-07-06 16:10:52: createLocal: - +2017-07-06 16:10:52: updateLocal: - +2017-07-06 16:10:52: deleteLocal: - +2017-07-06 16:10:52: createRemote: - +2017-07-06 16:10:52: updateRemote: - +2017-07-06 16:10:52: deleteRemote: 1 +2017-07-06 16:10:52: itemConflict: - +2017-07-06 16:10:53: noteConflict: - +2017-07-06 16:10:53: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:53: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:53: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:53: Total folders: 1 +2017-07-06 16:10:53: Total notes: 0 +2017-07-06 16:10:53: Total resources: 0 +2017-07-06 16:10:53: SELECT * FROM settings +2017-07-06 16:10:53: Starting synchronization... [1499353853253] +2017-07-06 16:10:53: mkdir /root/.sync +2017-07-06 16:10:53: mkdir /root/.resource +2017-07-06 16:10:53: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:53: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:53: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:53: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:53: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:53: SELECT * FROM deleted_items +2017-07-06 16:10:53: Sync: deleteRemote: local has been deleted: (Remote f5eed5c313904cdab4d571d77e536d66) +2017-07-06 16:10:53: delete /root/f5eed5c313904cdab4d571d77e536d66.md +2017-07-06 16:10:53: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:10:53: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:53: list /root +2017-07-06 16:10:53: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:53: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:53: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:53: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:53: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:53: Sync: deleteLocal: remote has been deleted: (Local 7f626f5290d5432e8d108f80ed8e4a44) +2017-07-06 16:10:53: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:53: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:53: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ? +2017-07-06 16:10:53: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:53: DELETE FROM folders WHERE id = ? +2017-07-06 16:10:53: ["7f626f5290d5432e8d108f80ed8e4a44"] +2017-07-06 16:10:53: Synchronization complete [1499353853253]: +2017-07-06 16:10:53: remotesToUpdate: - +2017-07-06 16:10:53: remotesToDelete: 1 +2017-07-06 16:10:53: localsToUdpate: - +2017-07-06 16:10:53: localsToDelete: 1 +2017-07-06 16:10:53: createLocal: - +2017-07-06 16:10:53: updateLocal: - +2017-07-06 16:10:53: deleteLocal: 1 +2017-07-06 16:10:53: createRemote: - +2017-07-06 16:10:53: updateRemote: - +2017-07-06 16:10:53: deleteRemote: 1 +2017-07-06 16:10:53: itemConflict: - +2017-07-06 16:10:53: noteConflict: - +2017-07-06 16:10:53: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:53: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:53: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:53: Total folders: 0 +2017-07-06 16:10:53: Total notes: 0 +2017-07-06 16:10:53: Total resources: 0 +2017-07-06 16:10:53: SELECT * FROM `folders` +2017-07-06 16:10:53: SELECT * FROM `notes` +2017-07-06 16:10:54: SELECT * FROM settings +2017-07-06 16:10:54: Starting synchronization... [1499353854081] +2017-07-06 16:10:54: mkdir /root/.sync +2017-07-06 16:10:54: mkdir /root/.resource +2017-07-06 16:10:54: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:54: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:54: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:54: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:54: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:54: SELECT * FROM deleted_items +2017-07-06 16:10:54: list /root +2017-07-06 16:10:54: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:54: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:54: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:54: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:54: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:54: Sync: deleteLocal: remote has been deleted: (Local f5eed5c313904cdab4d571d77e536d66) +2017-07-06 16:10:54: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:54: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:54: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ? +2017-07-06 16:10:54: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:54: DELETE FROM folders WHERE id = ? +2017-07-06 16:10:54: ["f5eed5c313904cdab4d571d77e536d66"] +2017-07-06 16:10:54: Synchronization complete [1499353854081]: +2017-07-06 16:10:54: remotesToUpdate: - +2017-07-06 16:10:54: remotesToDelete: - +2017-07-06 16:10:54: localsToUdpate: - +2017-07-06 16:10:54: localsToDelete: 1 +2017-07-06 16:10:54: createLocal: - +2017-07-06 16:10:54: updateLocal: - +2017-07-06 16:10:54: deleteLocal: 1 +2017-07-06 16:10:54: createRemote: - +2017-07-06 16:10:54: updateRemote: - +2017-07-06 16:10:54: deleteRemote: - +2017-07-06 16:10:54: itemConflict: - +2017-07-06 16:10:54: noteConflict: - +2017-07-06 16:10:54: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:54: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:54: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:54: Total folders: 0 +2017-07-06 16:10:54: Total notes: 0 +2017-07-06 16:10:54: Total resources: 0 +2017-07-06 16:10:54: SELECT * FROM `folders` +2017-07-06 16:10:54: SELECT * FROM `notes` +2017-07-06 16:10:54: BEGIN TRANSACTION +2017-07-06 16:10:54: DELETE FROM notes +2017-07-06 16:10:54: DELETE FROM folders +2017-07-06 16:10:54: DELETE FROM resources +2017-07-06 16:10:54: DELETE FROM tags +2017-07-06 16:10:54: DELETE FROM note_tags +2017-07-06 16:10:54: COMMIT +2017-07-06 16:10:54: SELECT * FROM settings +2017-07-06 16:10:54: BEGIN TRANSACTION +2017-07-06 16:10:54: DELETE FROM notes +2017-07-06 16:10:54: DELETE FROM folders +2017-07-06 16:10:54: DELETE FROM resources +2017-07-06 16:10:54: DELETE FROM tags +2017-07-06 16:10:54: DELETE FROM note_tags +2017-07-06 16:10:54: COMMIT +2017-07-06 16:10:55: SELECT * FROM settings +2017-07-06 16:10:55: SELECT * FROM settings +2017-07-06 16:10:55: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:10:55: ["folder1",1499353855324,"af7d4c80de504fc48d371abacc646902",1499353855324] +2017-07-06 16:10:55: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:55: ["af7d4c80de504fc48d371abacc646902","un","joplin","SET_ME",1499353855485,"dead6bb9f3304cd4aff300eea7773be1",1499353855486] +2017-07-06 16:10:55: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:55: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:55: Starting synchronization... [1499353855683] +2017-07-06 16:10:55: mkdir /root/.sync +2017-07-06 16:10:55: mkdir /root/.resource +2017-07-06 16:10:55: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:55: stat /root/af7d4c80de504fc48d371abacc646902.md +2017-07-06 16:10:55: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local af7d4c80de504fc48d371abacc646902, "folder1") +2017-07-06 16:10:55: put /root/.sync/af7d4c80de504fc48d371abacc646902.md_1499353855728 +2017-07-06 16:10:55: setTimestamp /root/.sync/af7d4c80de504fc48d371abacc646902.md_1499353855728 +2017-07-06 16:10:55: move /root/.sync/af7d4c80de504fc48d371abacc646902.md_1499353855728 => /root/af7d4c80de504fc48d371abacc646902.md +2017-07-06 16:10:55: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:55: [1499353855743,"af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:55: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:55: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:55: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:55: stat /root/dead6bb9f3304cd4aff300eea7773be1.md +2017-07-06 16:10:55: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local dead6bb9f3304cd4aff300eea7773be1, "un") +2017-07-06 16:10:55: put /root/.sync/dead6bb9f3304cd4aff300eea7773be1.md_1499353855924 +2017-07-06 16:10:55: setTimestamp /root/.sync/dead6bb9f3304cd4aff300eea7773be1.md_1499353855924 +2017-07-06 16:10:55: move /root/.sync/dead6bb9f3304cd4aff300eea7773be1.md_1499353855924 => /root/dead6bb9f3304cd4aff300eea7773be1.md +2017-07-06 16:10:55: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:10:55: [1499353855950,"dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:56: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:56: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:56: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:56: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:56: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:56: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:56: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:56: SELECT * FROM deleted_items +2017-07-06 16:10:56: list /root +2017-07-06 16:10:56: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:56: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:56: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:56: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:56: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:56: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:56: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:56: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:56: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:56: Synchronization complete [1499353855683]: +2017-07-06 16:10:56: remotesToUpdate: 2 +2017-07-06 16:10:56: remotesToDelete: - +2017-07-06 16:10:56: localsToUdpate: - +2017-07-06 16:10:56: localsToDelete: - +2017-07-06 16:10:56: createLocal: - +2017-07-06 16:10:56: updateLocal: - +2017-07-06 16:10:56: deleteLocal: - +2017-07-06 16:10:56: createRemote: 2 +2017-07-06 16:10:56: updateRemote: - +2017-07-06 16:10:56: deleteRemote: - +2017-07-06 16:10:56: itemConflict: - +2017-07-06 16:10:56: noteConflict: - +2017-07-06 16:10:56: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:56: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:56: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:56: Total folders: 1 +2017-07-06 16:10:56: Total notes: 1 +2017-07-06 16:10:56: Total resources: 0 +2017-07-06 16:10:56: SELECT * FROM settings +2017-07-06 16:10:56: Starting synchronization... [1499353856584] +2017-07-06 16:10:56: mkdir /root/.sync +2017-07-06 16:10:56: mkdir /root/.resource +2017-07-06 16:10:56: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:56: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:56: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:56: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:56: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:56: SELECT * FROM deleted_items +2017-07-06 16:10:56: list /root +2017-07-06 16:10:56: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:56: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:56: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:56: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:56: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:56: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:56: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:56: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:56: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:56: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:56: get /root/af7d4c80de504fc48d371abacc646902.md +2017-07-06 16:10:56: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:10:56: ["af7d4c80de504fc48d371abacc646902","folder1","1499353855324","1499353855324",1499353856757] +2017-07-06 16:10:56: Sync: createLocal: remote exists but local does not: (Remote af7d4c80de504fc48d371abacc646902, "folder1") +2017-07-06 16:10:56: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:56: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:56: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:56: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:56: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:10:56: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:57: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:10:57: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:57: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:10:57: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:57: get /root/dead6bb9f3304cd4aff300eea7773be1.md +2017-07-06 16:10:57: INSERT INTO `notes` (`id`, `parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:57: ["dead6bb9f3304cd4aff300eea7773be1","af7d4c80de504fc48d371abacc646902","un","","1499353855486","1499353855485",1499353857051,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0] +2017-07-06 16:10:57: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:57: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:57: Sync: createLocal: remote exists but local does not: (Remote dead6bb9f3304cd4aff300eea7773be1, "un") +2017-07-06 16:10:57: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:57: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:57: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:57: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:57: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:57: Synchronization complete [1499353856584]: +2017-07-06 16:10:57: remotesToUpdate: - +2017-07-06 16:10:57: remotesToDelete: - +2017-07-06 16:10:57: localsToUdpate: 2 +2017-07-06 16:10:57: localsToDelete: - +2017-07-06 16:10:57: createLocal: 2 +2017-07-06 16:10:57: updateLocal: - +2017-07-06 16:10:57: deleteLocal: - +2017-07-06 16:10:57: createRemote: - +2017-07-06 16:10:57: updateRemote: - +2017-07-06 16:10:57: deleteRemote: - +2017-07-06 16:10:57: itemConflict: - +2017-07-06 16:10:57: noteConflict: - +2017-07-06 16:10:57: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:57: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:57: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:57: Total folders: 1 +2017-07-06 16:10:57: Total notes: 1 +2017-07-06 16:10:57: Total resources: 0 +2017-07-06 16:10:57: DELETE FROM notes WHERE id = ? +2017-07-06 16:10:57: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:57: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:10:57: [1,"dead6bb9f3304cd4aff300eea7773be1",1499353857696] +2017-07-06 16:10:57: Starting synchronization... [1499353857849] +2017-07-06 16:10:57: mkdir /root/.sync +2017-07-06 16:10:57: mkdir /root/.resource +2017-07-06 16:10:57: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:57: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:57: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:57: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:57: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:57: SELECT * FROM deleted_items +2017-07-06 16:10:57: Sync: deleteRemote: local has been deleted: (Remote dead6bb9f3304cd4aff300eea7773be1) +2017-07-06 16:10:57: delete /root/dead6bb9f3304cd4aff300eea7773be1.md +2017-07-06 16:10:57: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:10:57: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:58: list /root +2017-07-06 16:10:58: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:58: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:58: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:58: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:58: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:58: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:58: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:58: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:58: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:58: Synchronization complete [1499353857849]: +2017-07-06 16:10:58: remotesToUpdate: - +2017-07-06 16:10:58: remotesToDelete: 1 +2017-07-06 16:10:58: localsToUdpate: - +2017-07-06 16:10:58: localsToDelete: - +2017-07-06 16:10:58: createLocal: - +2017-07-06 16:10:58: updateLocal: - +2017-07-06 16:10:58: deleteLocal: - +2017-07-06 16:10:58: createRemote: - +2017-07-06 16:10:58: updateRemote: - +2017-07-06 16:10:58: deleteRemote: 1 +2017-07-06 16:10:58: itemConflict: - +2017-07-06 16:10:58: noteConflict: - +2017-07-06 16:10:58: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:58: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:58: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:58: Total folders: 1 +2017-07-06 16:10:58: Total notes: 0 +2017-07-06 16:10:58: Total resources: 0 +2017-07-06 16:10:58: SELECT * FROM settings +2017-07-06 16:10:58: UPDATE `notes` SET `title`=?, `updated_time`=? WHERE id=? +2017-07-06 16:10:58: ["Modified after having been deleted",1499353858481,"dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:58: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:58: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:58: Starting synchronization... [1499353858689] +2017-07-06 16:10:58: mkdir /root/.sync +2017-07-06 16:10:58: mkdir /root/.resource +2017-07-06 16:10:58: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:58: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:58: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:58: stat /root/dead6bb9f3304cd4aff300eea7773be1.md +2017-07-06 16:10:58: Sync: noteConflict: remote has been deleted, but local has changes: (Local dead6bb9f3304cd4aff300eea7773be1, "Modified after having been deleted") +2017-07-06 16:10:58: INSERT INTO `notes` (`parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `is_conflict`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`, `id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:10:58: ["af7d4c80de504fc48d371abacc646902","Modified after having been deleted","",1499353855486,1499353858481,1499353855950,1,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0,"574c3774f06b45599cbc6e2061e670f0"] +2017-07-06 16:10:58: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:58: ["574c3774f06b45599cbc6e2061e670f0"] +2017-07-06 16:10:58: DELETE FROM notes WHERE id = ? +2017-07-06 16:10:58: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:59: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:10:59: [1,"dead6bb9f3304cd4aff300eea7773be1",1499353859163] +2017-07-06 16:10:59: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:59: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:59: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:10:59: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:59: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:10:59: SELECT * FROM deleted_items +2017-07-06 16:10:59: Sync: deleteRemote: local has been deleted: (Remote dead6bb9f3304cd4aff300eea7773be1) +2017-07-06 16:10:59: delete /root/dead6bb9f3304cd4aff300eea7773be1.md +2017-07-06 16:10:59: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:10:59: ["dead6bb9f3304cd4aff300eea7773be1"] +2017-07-06 16:10:59: list /root +2017-07-06 16:10:59: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:10:59: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:59: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:10:59: ["af7d4c80de504fc48d371abacc646902"] +2017-07-06 16:10:59: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:10:59: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:10:59: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:10:59: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:10:59: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:10:59: Synchronization complete [1499353858689]: +2017-07-06 16:10:59: remotesToUpdate: 1 +2017-07-06 16:10:59: remotesToDelete: 1 +2017-07-06 16:10:59: localsToUdpate: - +2017-07-06 16:10:59: localsToDelete: - +2017-07-06 16:10:59: createLocal: - +2017-07-06 16:10:59: updateLocal: - +2017-07-06 16:10:59: deleteLocal: - +2017-07-06 16:10:59: createRemote: - +2017-07-06 16:10:59: updateRemote: - +2017-07-06 16:10:59: deleteRemote: 1 +2017-07-06 16:10:59: itemConflict: - +2017-07-06 16:10:59: noteConflict: 1 +2017-07-06 16:10:59: SELECT count(*) as total FROM `folders` +2017-07-06 16:10:59: SELECT count(*) as total FROM `notes` +2017-07-06 16:10:59: SELECT count(*) as total FROM `resources` +2017-07-06 16:10:59: Total folders: 1 +2017-07-06 16:10:59: Total notes: 1 +2017-07-06 16:10:59: Total resources: 0 +2017-07-06 16:10:59: SELECT * FROM notes WHERE is_conflict = 1 +2017-07-06 16:10:59: SELECT * FROM notes WHERE is_conflict = 0 +2017-07-06 16:10:59: BEGIN TRANSACTION +2017-07-06 16:10:59: DELETE FROM notes +2017-07-06 16:10:59: DELETE FROM folders +2017-07-06 16:10:59: DELETE FROM resources +2017-07-06 16:10:59: DELETE FROM tags +2017-07-06 16:10:59: DELETE FROM note_tags +2017-07-06 16:10:59: COMMIT +2017-07-06 16:11:00: SELECT * FROM settings +2017-07-06 16:11:00: BEGIN TRANSACTION +2017-07-06 16:11:00: DELETE FROM notes +2017-07-06 16:11:00: DELETE FROM folders +2017-07-06 16:11:00: DELETE FROM resources +2017-07-06 16:11:00: DELETE FROM tags +2017-07-06 16:11:00: DELETE FROM note_tags +2017-07-06 16:11:00: COMMIT +2017-07-06 16:11:00: SELECT * FROM settings +2017-07-06 16:11:00: SELECT * FROM settings +2017-07-06 16:11:00: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:11:00: ["folder1",1499353860464,"1898ffb1173344d9a6bb70114f1a7ca5",1499353860464] +2017-07-06 16:11:00: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:11:00: ["folder2",1499353860634,"3466bfedc9934a0f906da259d9d583a9",1499353860634] +2017-07-06 16:11:00: INSERT INTO `notes` (`parent_id`, `title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:11:00: ["1898ffb1173344d9a6bb70114f1a7ca5","un","joplin","SET_ME",1499353860920,"ef106455cb484dd6bfc45d4f05596701",1499353860920] +2017-07-06 16:11:01: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:01: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:01: Starting synchronization... [1499353861134] +2017-07-06 16:11:01: mkdir /root/.sync +2017-07-06 16:11:01: mkdir /root/.resource +2017-07-06 16:11:01: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:01: stat /root/1898ffb1173344d9a6bb70114f1a7ca5.md +2017-07-06 16:11:01: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 1898ffb1173344d9a6bb70114f1a7ca5, "folder1") +2017-07-06 16:11:01: put /root/.sync/1898ffb1173344d9a6bb70114f1a7ca5.md_1499353861171 +2017-07-06 16:11:01: setTimestamp /root/.sync/1898ffb1173344d9a6bb70114f1a7ca5.md_1499353861171 +2017-07-06 16:11:01: move /root/.sync/1898ffb1173344d9a6bb70114f1a7ca5.md_1499353861171 => /root/1898ffb1173344d9a6bb70114f1a7ca5.md +2017-07-06 16:11:01: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:01: [1499353861188,"1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:01: stat /root/3466bfedc9934a0f906da259d9d583a9.md +2017-07-06 16:11:01: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 3466bfedc9934a0f906da259d9d583a9, "folder2") +2017-07-06 16:11:01: put /root/.sync/3466bfedc9934a0f906da259d9d583a9.md_1499353861352 +2017-07-06 16:11:01: setTimestamp /root/.sync/3466bfedc9934a0f906da259d9d583a9.md_1499353861352 +2017-07-06 16:11:01: move /root/.sync/3466bfedc9934a0f906da259d9d583a9.md_1499353861352 => /root/3466bfedc9934a0f906da259d9d583a9.md +2017-07-06 16:11:01: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:01: [1499353861373,"3466bfedc9934a0f906da259d9d583a9"] +2017-07-06 16:11:01: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:01: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:01: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:01: stat /root/ef106455cb484dd6bfc45d4f05596701.md +2017-07-06 16:11:01: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local ef106455cb484dd6bfc45d4f05596701, "un") +2017-07-06 16:11:01: put /root/.sync/ef106455cb484dd6bfc45d4f05596701.md_1499353861648 +2017-07-06 16:11:01: setTimestamp /root/.sync/ef106455cb484dd6bfc45d4f05596701.md_1499353861648 +2017-07-06 16:11:01: move /root/.sync/ef106455cb484dd6bfc45d4f05596701.md_1499353861648 => /root/ef106455cb484dd6bfc45d4f05596701.md +2017-07-06 16:11:01: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:01: [1499353861676,"ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:01: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:01: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:01: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:01: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:01: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:01: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:01: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:01: SELECT * FROM deleted_items +2017-07-06 16:11:01: list /root +2017-07-06 16:11:01: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:01: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:01: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:01: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:01: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:01: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:01: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:01: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:01: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:01: Synchronization complete [1499353861134]: +2017-07-06 16:11:01: remotesToUpdate: 3 +2017-07-06 16:11:01: remotesToDelete: - +2017-07-06 16:11:01: localsToUdpate: - +2017-07-06 16:11:01: localsToDelete: - +2017-07-06 16:11:01: createLocal: - +2017-07-06 16:11:01: updateLocal: - +2017-07-06 16:11:01: deleteLocal: - +2017-07-06 16:11:01: createRemote: 3 +2017-07-06 16:11:01: updateRemote: - +2017-07-06 16:11:02: deleteRemote: - +2017-07-06 16:11:02: itemConflict: - +2017-07-06 16:11:02: noteConflict: - +2017-07-06 16:11:02: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:02: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:02: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:02: Total folders: 2 +2017-07-06 16:11:02: Total notes: 1 +2017-07-06 16:11:02: Total resources: 0 +2017-07-06 16:11:02: SELECT * FROM settings +2017-07-06 16:11:02: Starting synchronization... [1499353862249] +2017-07-06 16:11:02: mkdir /root/.sync +2017-07-06 16:11:02: mkdir /root/.resource +2017-07-06 16:11:02: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:02: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:02: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:02: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:02: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:02: SELECT * FROM deleted_items +2017-07-06 16:11:02: list /root +2017-07-06 16:11:02: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:02: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:02: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:02: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:02: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:02: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:02: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:02: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:02: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:02: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:02: get /root/1898ffb1173344d9a6bb70114f1a7ca5.md +2017-07-06 16:11:02: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:11:02: ["1898ffb1173344d9a6bb70114f1a7ca5","folder1","1499353860464","1499353860464",1499353862365] +2017-07-06 16:11:02: Sync: createLocal: remote exists but local does not: (Remote 1898ffb1173344d9a6bb70114f1a7ca5, "folder1") +2017-07-06 16:11:02: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:02: ["3466bfedc9934a0f906da259d9d583a9"] +2017-07-06 16:11:02: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:02: ["3466bfedc9934a0f906da259d9d583a9"] +2017-07-06 16:11:02: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:02: ["3466bfedc9934a0f906da259d9d583a9"] +2017-07-06 16:11:02: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:02: ["3466bfedc9934a0f906da259d9d583a9"] +2017-07-06 16:11:02: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:02: ["3466bfedc9934a0f906da259d9d583a9"] +2017-07-06 16:11:02: get /root/3466bfedc9934a0f906da259d9d583a9.md +2017-07-06 16:11:02: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:11:02: ["3466bfedc9934a0f906da259d9d583a9","folder2","1499353860634","1499353860634",1499353862659] +2017-07-06 16:11:02: Sync: createLocal: remote exists but local does not: (Remote 3466bfedc9934a0f906da259d9d583a9, "folder2") +2017-07-06 16:11:02: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:02: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:02: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:02: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:02: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:02: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:02: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:02: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:02: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:02: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:02: get /root/ef106455cb484dd6bfc45d4f05596701.md +2017-07-06 16:11:02: INSERT INTO `notes` (`id`, `parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:11:02: ["ef106455cb484dd6bfc45d4f05596701","1898ffb1173344d9a6bb70114f1a7ca5","un","","1499353860920","1499353860920",1499353862911,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0] +2017-07-06 16:11:03: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:03: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:03: Sync: createLocal: remote exists but local does not: (Remote ef106455cb484dd6bfc45d4f05596701, "un") +2017-07-06 16:11:03: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:03: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:03: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:03: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:03: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:03: Synchronization complete [1499353862249]: +2017-07-06 16:11:03: remotesToUpdate: - +2017-07-06 16:11:03: remotesToDelete: - +2017-07-06 16:11:03: localsToUdpate: 3 +2017-07-06 16:11:03: localsToDelete: - +2017-07-06 16:11:03: createLocal: 3 +2017-07-06 16:11:03: updateLocal: - +2017-07-06 16:11:03: deleteLocal: - +2017-07-06 16:11:03: createRemote: - +2017-07-06 16:11:03: updateRemote: - +2017-07-06 16:11:03: deleteRemote: - +2017-07-06 16:11:03: itemConflict: - +2017-07-06 16:11:03: noteConflict: - +2017-07-06 16:11:03: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:03: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:03: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:03: Total folders: 2 +2017-07-06 16:11:03: Total notes: 1 +2017-07-06 16:11:03: Total resources: 0 +2017-07-06 16:11:03: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:03: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:03: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ? +2017-07-06 16:11:03: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:03: DELETE FROM notes WHERE id = ? +2017-07-06 16:11:03: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:03: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:11:03: [1,"ef106455cb484dd6bfc45d4f05596701",1499353863709] +2017-07-06 16:11:03: DELETE FROM folders WHERE id = ? +2017-07-06 16:11:03: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:04: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:11:04: [2,"1898ffb1173344d9a6bb70114f1a7ca5",1499353864023] +2017-07-06 16:11:04: Starting synchronization... [1499353864188] +2017-07-06 16:11:04: mkdir /root/.sync +2017-07-06 16:11:04: mkdir /root/.resource +2017-07-06 16:11:04: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:04: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:04: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:04: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:04: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:04: SELECT * FROM deleted_items +2017-07-06 16:11:04: Sync: deleteRemote: local has been deleted: (Remote ef106455cb484dd6bfc45d4f05596701) +2017-07-06 16:11:04: delete /root/ef106455cb484dd6bfc45d4f05596701.md +2017-07-06 16:11:04: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:11:04: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:04: Sync: deleteRemote: local has been deleted: (Remote 1898ffb1173344d9a6bb70114f1a7ca5) +2017-07-06 16:11:04: delete /root/1898ffb1173344d9a6bb70114f1a7ca5.md +2017-07-06 16:11:04: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:11:04: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:04: list /root +2017-07-06 16:11:04: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:04: ["3466bfedc9934a0f906da259d9d583a9"] +2017-07-06 16:11:04: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:04: ["3466bfedc9934a0f906da259d9d583a9"] +2017-07-06 16:11:04: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:04: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:04: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:04: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:04: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:04: Synchronization complete [1499353864188]: +2017-07-06 16:11:04: remotesToUpdate: - +2017-07-06 16:11:04: remotesToDelete: 2 +2017-07-06 16:11:04: localsToUdpate: - +2017-07-06 16:11:04: localsToDelete: - +2017-07-06 16:11:04: createLocal: - +2017-07-06 16:11:04: updateLocal: - +2017-07-06 16:11:04: deleteLocal: - +2017-07-06 16:11:04: createRemote: - +2017-07-06 16:11:04: updateRemote: - +2017-07-06 16:11:04: deleteRemote: 2 +2017-07-06 16:11:04: itemConflict: - +2017-07-06 16:11:04: noteConflict: - +2017-07-06 16:11:04: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:04: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:04: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:04: Total folders: 1 +2017-07-06 16:11:04: Total notes: 0 +2017-07-06 16:11:04: Total resources: 0 +2017-07-06 16:11:04: SELECT * FROM settings +2017-07-06 16:11:05: UPDATE `folders` SET `title`=?, `updated_time`=? WHERE id=? +2017-07-06 16:11:05: ["Modified after having been deleted",1499353865031,"1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:05: Starting synchronization... [1499353865152] +2017-07-06 16:11:05: mkdir /root/.sync +2017-07-06 16:11:05: mkdir /root/.resource +2017-07-06 16:11:05: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:05: stat /root/1898ffb1173344d9a6bb70114f1a7ca5.md +2017-07-06 16:11:05: Sync: itemConflict: remote has been deleted, but local has changes: (Local 1898ffb1173344d9a6bb70114f1a7ca5, "Modified after having been deleted") +2017-07-06 16:11:05: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:05: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:05: SELECT id FROM notes WHERE is_conflict = 0 AND parent_id = ? +2017-07-06 16:11:05: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:05: DELETE FROM notes WHERE id = ? +2017-07-06 16:11:05: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:05: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:11:05: [1,"ef106455cb484dd6bfc45d4f05596701",1499353865313] +2017-07-06 16:11:05: DELETE FROM folders WHERE id = ? +2017-07-06 16:11:05: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:05: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:11:05: [2,"1898ffb1173344d9a6bb70114f1a7ca5",1499353865649] +2017-07-06 16:11:05: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:05: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:05: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:05: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:05: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:05: SELECT * FROM deleted_items +2017-07-06 16:11:05: Sync: deleteRemote: local has been deleted: (Remote ef106455cb484dd6bfc45d4f05596701) +2017-07-06 16:11:05: delete /root/ef106455cb484dd6bfc45d4f05596701.md +2017-07-06 16:11:05: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:11:05: ["ef106455cb484dd6bfc45d4f05596701"] +2017-07-06 16:11:06: Sync: deleteRemote: local has been deleted: (Remote 1898ffb1173344d9a6bb70114f1a7ca5) +2017-07-06 16:11:06: delete /root/1898ffb1173344d9a6bb70114f1a7ca5.md +2017-07-06 16:11:06: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:11:06: ["1898ffb1173344d9a6bb70114f1a7ca5"] +2017-07-06 16:11:06: list /root +2017-07-06 16:11:06: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:06: ["3466bfedc9934a0f906da259d9d583a9"] +2017-07-06 16:11:06: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:06: ["3466bfedc9934a0f906da259d9d583a9"] +2017-07-06 16:11:06: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:06: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:06: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:06: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:06: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:06: Synchronization complete [1499353865152]: +2017-07-06 16:11:06: remotesToUpdate: 1 +2017-07-06 16:11:06: remotesToDelete: 2 +2017-07-06 16:11:06: localsToUdpate: - +2017-07-06 16:11:06: localsToDelete: - +2017-07-06 16:11:06: createLocal: - +2017-07-06 16:11:06: updateLocal: - +2017-07-06 16:11:06: deleteLocal: - +2017-07-06 16:11:06: createRemote: - +2017-07-06 16:11:06: updateRemote: - +2017-07-06 16:11:06: deleteRemote: 2 +2017-07-06 16:11:06: itemConflict: 1 +2017-07-06 16:11:06: noteConflict: - +2017-07-06 16:11:06: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:06: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:06: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:06: Total folders: 1 +2017-07-06 16:11:06: Total notes: 0 +2017-07-06 16:11:06: Total resources: 0 +2017-07-06 16:11:06: SELECT * FROM `folders` +2017-07-06 16:11:06: SELECT * FROM `notes` +2017-07-06 16:11:06: BEGIN TRANSACTION +2017-07-06 16:11:06: DELETE FROM notes +2017-07-06 16:11:06: DELETE FROM folders +2017-07-06 16:11:06: DELETE FROM resources +2017-07-06 16:11:06: DELETE FROM tags +2017-07-06 16:11:06: DELETE FROM note_tags +2017-07-06 16:11:06: COMMIT +2017-07-06 16:11:06: SELECT * FROM settings +2017-07-06 16:11:06: BEGIN TRANSACTION +2017-07-06 16:11:06: DELETE FROM notes +2017-07-06 16:11:06: DELETE FROM folders +2017-07-06 16:11:06: DELETE FROM resources +2017-07-06 16:11:06: DELETE FROM tags +2017-07-06 16:11:06: DELETE FROM note_tags +2017-07-06 16:11:06: COMMIT +2017-07-06 16:11:07: SELECT * FROM settings +2017-07-06 16:11:07: SELECT * FROM settings +2017-07-06 16:11:07: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:11:07: ["folder",1499353867319,"04693d257e1d49309f9fc138ad209f2a",1499353867319] +2017-07-06 16:11:07: SELECT * FROM settings +2017-07-06 16:11:07: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:11:07: ["folder",1499353867700,"c1888443280949029f95bbc74f0c29f8",1499353867700] +2017-07-06 16:11:07: Starting synchronization... [1499353867854] +2017-07-06 16:11:07: mkdir /root/.sync +2017-07-06 16:11:07: mkdir /root/.resource +2017-07-06 16:11:07: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:07: stat /root/c1888443280949029f95bbc74f0c29f8.md +2017-07-06 16:11:07: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local c1888443280949029f95bbc74f0c29f8, "folder") +2017-07-06 16:11:07: put /root/.sync/c1888443280949029f95bbc74f0c29f8.md_1499353867919 +2017-07-06 16:11:07: setTimestamp /root/.sync/c1888443280949029f95bbc74f0c29f8.md_1499353867919 +2017-07-06 16:11:07: move /root/.sync/c1888443280949029f95bbc74f0c29f8.md_1499353867919 => /root/c1888443280949029f95bbc74f0c29f8.md +2017-07-06 16:11:07: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:07: [1499353867936,"c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:08: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:08: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:08: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:08: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:08: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:08: SELECT * FROM deleted_items +2017-07-06 16:11:08: list /root +2017-07-06 16:11:08: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:08: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:08: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:08: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:08: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:08: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:08: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:08: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:08: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:08: Synchronization complete [1499353867854]: +2017-07-06 16:11:08: remotesToUpdate: 1 +2017-07-06 16:11:08: remotesToDelete: - +2017-07-06 16:11:08: localsToUdpate: - +2017-07-06 16:11:08: localsToDelete: - +2017-07-06 16:11:08: createLocal: - +2017-07-06 16:11:08: updateLocal: - +2017-07-06 16:11:08: deleteLocal: - +2017-07-06 16:11:08: createRemote: 1 +2017-07-06 16:11:08: updateRemote: - +2017-07-06 16:11:08: deleteRemote: - +2017-07-06 16:11:08: itemConflict: - +2017-07-06 16:11:08: noteConflict: - +2017-07-06 16:11:08: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:08: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:08: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:08: Total folders: 1 +2017-07-06 16:11:08: Total notes: 0 +2017-07-06 16:11:08: Total resources: 0 +2017-07-06 16:11:08: SELECT * FROM settings +2017-07-06 16:11:08: Starting synchronization... [1499353868620] +2017-07-06 16:11:08: mkdir /root/.sync +2017-07-06 16:11:08: mkdir /root/.resource +2017-07-06 16:11:08: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:08: stat /root/04693d257e1d49309f9fc138ad209f2a.md +2017-07-06 16:11:08: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 04693d257e1d49309f9fc138ad209f2a, "folder") +2017-07-06 16:11:08: put /root/.sync/04693d257e1d49309f9fc138ad209f2a.md_1499353868664 +2017-07-06 16:11:08: setTimestamp /root/.sync/04693d257e1d49309f9fc138ad209f2a.md_1499353868664 +2017-07-06 16:11:08: move /root/.sync/04693d257e1d49309f9fc138ad209f2a.md_1499353868664 => /root/04693d257e1d49309f9fc138ad209f2a.md +2017-07-06 16:11:08: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:08: [1499353868682,"04693d257e1d49309f9fc138ad209f2a"] +2017-07-06 16:11:08: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:08: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:08: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:08: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:08: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:08: SELECT * FROM deleted_items +2017-07-06 16:11:08: list /root +2017-07-06 16:11:08: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:08: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:08: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:08: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:08: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:08: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:08: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:08: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:08: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:08: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:08: get /root/c1888443280949029f95bbc74f0c29f8.md +2017-07-06 16:11:08: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:11:08: ["c1888443280949029f95bbc74f0c29f8","folder","1499353867700","1499353867700",1499353868952] +2017-07-06 16:11:09: Sync: createLocal: remote exists but local does not: (Remote c1888443280949029f95bbc74f0c29f8, "folder") +2017-07-06 16:11:09: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:09: ["04693d257e1d49309f9fc138ad209f2a"] +2017-07-06 16:11:09: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:09: ["04693d257e1d49309f9fc138ad209f2a"] +2017-07-06 16:11:09: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:09: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:09: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:09: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:09: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:09: Synchronization complete [1499353868620]: +2017-07-06 16:11:09: remotesToUpdate: 1 +2017-07-06 16:11:09: remotesToDelete: - +2017-07-06 16:11:09: localsToUdpate: 1 +2017-07-06 16:11:09: localsToDelete: - +2017-07-06 16:11:09: createLocal: 1 +2017-07-06 16:11:09: updateLocal: - +2017-07-06 16:11:09: deleteLocal: - +2017-07-06 16:11:09: createRemote: 1 +2017-07-06 16:11:09: updateRemote: - +2017-07-06 16:11:09: deleteRemote: - +2017-07-06 16:11:09: itemConflict: - +2017-07-06 16:11:09: noteConflict: - +2017-07-06 16:11:09: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:09: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:09: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:09: Total folders: 2 +2017-07-06 16:11:09: Total notes: 0 +2017-07-06 16:11:09: Total resources: 0 +2017-07-06 16:11:09: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:09: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:09: Starting synchronization... [1499353869300] +2017-07-06 16:11:09: mkdir /root/.sync +2017-07-06 16:11:09: mkdir /root/.resource +2017-07-06 16:11:09: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:09: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:09: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:09: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:09: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:09: SELECT * FROM deleted_items +2017-07-06 16:11:09: list /root +2017-07-06 16:11:09: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:09: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:09: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:09: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:09: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:09: ["04693d257e1d49309f9fc138ad209f2a"] +2017-07-06 16:11:09: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:09: ["04693d257e1d49309f9fc138ad209f2a"] +2017-07-06 16:11:09: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:09: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:09: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:09: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:09: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:09: Synchronization complete [1499353869300]: +2017-07-06 16:11:09: remotesToUpdate: - +2017-07-06 16:11:09: remotesToDelete: - +2017-07-06 16:11:09: localsToUdpate: - +2017-07-06 16:11:09: localsToDelete: - +2017-07-06 16:11:09: createLocal: - +2017-07-06 16:11:09: updateLocal: - +2017-07-06 16:11:09: deleteLocal: - +2017-07-06 16:11:09: createRemote: - +2017-07-06 16:11:09: updateRemote: - +2017-07-06 16:11:09: deleteRemote: - +2017-07-06 16:11:09: itemConflict: - +2017-07-06 16:11:09: noteConflict: - +2017-07-06 16:11:09: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:09: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:09: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:09: Total folders: 2 +2017-07-06 16:11:09: Total notes: 0 +2017-07-06 16:11:09: Total resources: 0 +2017-07-06 16:11:09: SELECT * FROM settings +2017-07-06 16:11:09: Starting synchronization... [1499353869775] +2017-07-06 16:11:09: mkdir /root/.sync +2017-07-06 16:11:09: mkdir /root/.resource +2017-07-06 16:11:09: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:09: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:09: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:09: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:09: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:09: SELECT * FROM deleted_items +2017-07-06 16:11:09: list /root +2017-07-06 16:11:09: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:09: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:09: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:09: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:09: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:09: ["04693d257e1d49309f9fc138ad209f2a"] +2017-07-06 16:11:09: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:09: ["04693d257e1d49309f9fc138ad209f2a"] +2017-07-06 16:11:09: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:09: ["04693d257e1d49309f9fc138ad209f2a"] +2017-07-06 16:11:09: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:09: ["04693d257e1d49309f9fc138ad209f2a"] +2017-07-06 16:11:09: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:09: ["04693d257e1d49309f9fc138ad209f2a"] +2017-07-06 16:11:09: get /root/04693d257e1d49309f9fc138ad209f2a.md +2017-07-06 16:11:09: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:11:09: ["04693d257e1d49309f9fc138ad209f2a","folder","1499353867319","1499353867319",1499353869923] +2017-07-06 16:11:10: Sync: createLocal: remote exists but local does not: (Remote 04693d257e1d49309f9fc138ad209f2a, "folder") +2017-07-06 16:11:10: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:10: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:10: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:10: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:10: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:10: Synchronization complete [1499353869775]: +2017-07-06 16:11:10: remotesToUpdate: - +2017-07-06 16:11:10: remotesToDelete: - +2017-07-06 16:11:10: localsToUdpate: 1 +2017-07-06 16:11:10: localsToDelete: - +2017-07-06 16:11:10: createLocal: 1 +2017-07-06 16:11:10: updateLocal: - +2017-07-06 16:11:10: deleteLocal: - +2017-07-06 16:11:10: createRemote: - +2017-07-06 16:11:10: updateRemote: - +2017-07-06 16:11:10: deleteRemote: - +2017-07-06 16:11:10: itemConflict: - +2017-07-06 16:11:10: noteConflict: - +2017-07-06 16:11:10: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:10: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:10: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:10: Total folders: 2 +2017-07-06 16:11:10: Total notes: 0 +2017-07-06 16:11:10: Total resources: 0 +2017-07-06 16:11:10: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:10: ["c1888443280949029f95bbc74f0c29f8"] +2017-07-06 16:11:10: BEGIN TRANSACTION +2017-07-06 16:11:10: DELETE FROM notes +2017-07-06 16:11:10: DELETE FROM folders +2017-07-06 16:11:10: DELETE FROM resources +2017-07-06 16:11:10: DELETE FROM tags +2017-07-06 16:11:10: DELETE FROM note_tags +2017-07-06 16:11:10: COMMIT +2017-07-06 16:11:10: SELECT * FROM settings +2017-07-06 16:11:10: BEGIN TRANSACTION +2017-07-06 16:11:10: DELETE FROM notes +2017-07-06 16:11:10: DELETE FROM folders +2017-07-06 16:11:10: DELETE FROM resources +2017-07-06 16:11:10: DELETE FROM tags +2017-07-06 16:11:10: DELETE FROM note_tags +2017-07-06 16:11:10: COMMIT +2017-07-06 16:11:10: SELECT * FROM settings +2017-07-06 16:11:10: SELECT * FROM settings +2017-07-06 16:11:10: INSERT INTO `folders` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:11:10: ["folder",1499353870829,"e388fa9d52d74736822bccf5a6e7b512",1499353870829] +2017-07-06 16:11:10: INSERT INTO `notes` (`title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?) +2017-07-06 16:11:10: ["mynote","joplin","SET_ME",1499353870979,"2671dd68eba64e90a75db6711f89ab36",1499353870980] +2017-07-06 16:11:11: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:11: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:11: INSERT INTO `notes` (`title`, `source`, `source_application`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?, ?) +2017-07-06 16:11:11: ["mynote2","joplin","SET_ME",1499353871188,"0b197042f5954cb59f3005e18ffeb4ee",1499353871188] +2017-07-06 16:11:11: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:11: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:11: INSERT INTO `tags` (`title`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?) +2017-07-06 16:11:11: ["mytag",1499353871376,"8ca68ac28a0840aeb762c02379a5003a",1499353871376] +2017-07-06 16:11:11: Starting synchronization... [1499353871551] +2017-07-06 16:11:11: mkdir /root/.sync +2017-07-06 16:11:11: mkdir /root/.resource +2017-07-06 16:11:11: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:11: stat /root/e388fa9d52d74736822bccf5a6e7b512.md +2017-07-06 16:11:11: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local e388fa9d52d74736822bccf5a6e7b512, "folder") +2017-07-06 16:11:11: put /root/.sync/e388fa9d52d74736822bccf5a6e7b512.md_1499353871606 +2017-07-06 16:11:11: setTimestamp /root/.sync/e388fa9d52d74736822bccf5a6e7b512.md_1499353871606 +2017-07-06 16:11:11: move /root/.sync/e388fa9d52d74736822bccf5a6e7b512.md_1499353871606 => /root/e388fa9d52d74736822bccf5a6e7b512.md +2017-07-06 16:11:11: UPDATE `folders` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:11: [1499353871617,"e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:11: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:11: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:11: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:11: stat /root/2671dd68eba64e90a75db6711f89ab36.md +2017-07-06 16:11:11: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 2671dd68eba64e90a75db6711f89ab36, "mynote") +2017-07-06 16:11:11: put /root/.sync/2671dd68eba64e90a75db6711f89ab36.md_1499353871833 +2017-07-06 16:11:11: setTimestamp /root/.sync/2671dd68eba64e90a75db6711f89ab36.md_1499353871833 +2017-07-06 16:11:11: move /root/.sync/2671dd68eba64e90a75db6711f89ab36.md_1499353871833 => /root/2671dd68eba64e90a75db6711f89ab36.md +2017-07-06 16:11:11: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:11: [1499353871849,"2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:12: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:12: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:12: stat /root/0b197042f5954cb59f3005e18ffeb4ee.md +2017-07-06 16:11:12: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 0b197042f5954cb59f3005e18ffeb4ee, "mynote2") +2017-07-06 16:11:12: put /root/.sync/0b197042f5954cb59f3005e18ffeb4ee.md_1499353872052 +2017-07-06 16:11:12: setTimestamp /root/.sync/0b197042f5954cb59f3005e18ffeb4ee.md_1499353872052 +2017-07-06 16:11:12: move /root/.sync/0b197042f5954cb59f3005e18ffeb4ee.md_1499353872052 => /root/0b197042f5954cb59f3005e18ffeb4ee.md +2017-07-06 16:11:12: UPDATE `notes` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:12: [1499353872065,"0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:12: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:12: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:12: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: stat /root/8ca68ac28a0840aeb762c02379a5003a.md +2017-07-06 16:11:12: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 8ca68ac28a0840aeb762c02379a5003a, "mytag") +2017-07-06 16:11:12: put /root/.sync/8ca68ac28a0840aeb762c02379a5003a.md_1499353872277 +2017-07-06 16:11:12: setTimestamp /root/.sync/8ca68ac28a0840aeb762c02379a5003a.md_1499353872277 +2017-07-06 16:11:12: move /root/.sync/8ca68ac28a0840aeb762c02379a5003a.md_1499353872277 => /root/8ca68ac28a0840aeb762c02379a5003a.md +2017-07-06 16:11:12: UPDATE `tags` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:12: [1499353872297,"8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:12: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM deleted_items +2017-07-06 16:11:12: list /root +2017-07-06 16:11:12: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:12: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:12: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:12: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:12: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:12: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:12: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:12: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:12: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:12: Synchronization complete [1499353871551]: +2017-07-06 16:11:12: remotesToUpdate: 4 +2017-07-06 16:11:12: remotesToDelete: - +2017-07-06 16:11:12: localsToUdpate: - +2017-07-06 16:11:12: localsToDelete: - +2017-07-06 16:11:12: createLocal: - +2017-07-06 16:11:12: updateLocal: - +2017-07-06 16:11:12: deleteLocal: - +2017-07-06 16:11:12: createRemote: 4 +2017-07-06 16:11:12: updateRemote: - +2017-07-06 16:11:12: deleteRemote: - +2017-07-06 16:11:12: itemConflict: - +2017-07-06 16:11:12: noteConflict: - +2017-07-06 16:11:12: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:12: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:12: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:12: Total folders: 1 +2017-07-06 16:11:12: Total notes: 2 +2017-07-06 16:11:12: Total resources: 0 +2017-07-06 16:11:12: SELECT * FROM settings +2017-07-06 16:11:12: Starting synchronization... [1499353872893] +2017-07-06 16:11:12: mkdir /root/.sync +2017-07-06 16:11:12: mkdir /root/.resource +2017-07-06 16:11:12: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:12: SELECT * FROM deleted_items +2017-07-06 16:11:12: list /root +2017-07-06 16:11:12: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:12: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:12: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:13: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:13: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:13: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:13: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:13: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:13: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:13: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:13: get /root/e388fa9d52d74736822bccf5a6e7b512.md +2017-07-06 16:11:13: INSERT INTO `folders` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:11:13: ["e388fa9d52d74736822bccf5a6e7b512","folder","1499353870829","1499353870829",1499353873038] +2017-07-06 16:11:13: Sync: createLocal: remote exists but local does not: (Remote e388fa9d52d74736822bccf5a6e7b512, "folder") +2017-07-06 16:11:13: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:13: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:13: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:13: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:13: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:13: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:13: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:13: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:13: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:13: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:13: get /root/2671dd68eba64e90a75db6711f89ab36.md +2017-07-06 16:11:13: INSERT INTO `notes` (`id`, `parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:11:13: ["2671dd68eba64e90a75db6711f89ab36","","mynote","","1499353870980","1499353870979",1499353873262,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0] +2017-07-06 16:11:13: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:13: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:13: Sync: createLocal: remote exists but local does not: (Remote 2671dd68eba64e90a75db6711f89ab36, "mynote") +2017-07-06 16:11:13: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:13: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:13: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:13: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:13: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:13: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:13: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:13: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:13: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:13: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:13: get /root/0b197042f5954cb59f3005e18ffeb4ee.md +2017-07-06 16:11:13: INSERT INTO `notes` (`id`, `parent_id`, `title`, `body`, `created_time`, `updated_time`, `sync_time`, `latitude`, `longitude`, `altitude`, `author`, `source_url`, `is_todo`, `todo_due`, `todo_completed`, `source`, `source_application`, `application_data`, `order`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +2017-07-06 16:11:13: ["0b197042f5954cb59f3005e18ffeb4ee","","mynote2","","1499353871188","1499353871188",1499353873582,"0.00000000","0.00000000","0.0000","","",0,0,0,"joplin","SET_ME","",0] +2017-07-06 16:11:13: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:13: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:13: Sync: createLocal: remote exists but local does not: (Remote 0b197042f5954cb59f3005e18ffeb4ee, "mynote2") +2017-07-06 16:11:13: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:13: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:13: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:13: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:13: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:13: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:13: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:13: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:13: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:13: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:13: get /root/8ca68ac28a0840aeb762c02379a5003a.md +2017-07-06 16:11:13: INSERT INTO `tags` (`id`, `title`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:11:13: ["8ca68ac28a0840aeb762c02379a5003a","mytag","1499353871376","1499353871376",1499353873973] +2017-07-06 16:11:14: Sync: createLocal: remote exists but local does not: (Remote 8ca68ac28a0840aeb762c02379a5003a, "mytag") +2017-07-06 16:11:14: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:14: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:14: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:14: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:14: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:14: Synchronization complete [1499353872893]: +2017-07-06 16:11:14: remotesToUpdate: - +2017-07-06 16:11:14: remotesToDelete: - +2017-07-06 16:11:14: localsToUdpate: 4 +2017-07-06 16:11:14: localsToDelete: - +2017-07-06 16:11:14: createLocal: 4 +2017-07-06 16:11:14: updateLocal: - +2017-07-06 16:11:14: deleteLocal: - +2017-07-06 16:11:14: createRemote: - +2017-07-06 16:11:14: updateRemote: - +2017-07-06 16:11:14: deleteRemote: - +2017-07-06 16:11:14: itemConflict: - +2017-07-06 16:11:14: noteConflict: - +2017-07-06 16:11:14: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:14: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:14: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:14: Total folders: 1 +2017-07-06 16:11:14: Total notes: 2 +2017-07-06 16:11:14: Total resources: 0 +2017-07-06 16:11:14: SELECT * FROM `tags` WHERE `title` = ? +2017-07-06 16:11:14: ["mytag"] +2017-07-06 16:11:14: SELECT note_id FROM note_tags WHERE tag_id = ? AND note_id = ? LIMIT 1 +2017-07-06 16:11:14: ["8ca68ac28a0840aeb762c02379a5003a","2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:14: INSERT INTO `note_tags` (`note_id`, `tag_id`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:11:14: ["2671dd68eba64e90a75db6711f89ab36","8ca68ac28a0840aeb762c02379a5003a",1499353874233,"8caaa9d2da6a4646925d57bf235002d3",1499353874233] +2017-07-06 16:11:14: SELECT note_id FROM note_tags WHERE tag_id = ? AND note_id = ? LIMIT 1 +2017-07-06 16:11:14: ["8ca68ac28a0840aeb762c02379a5003a","0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:14: INSERT INTO `note_tags` (`note_id`, `tag_id`, `updated_time`, `id`, `created_time`) VALUES (?, ?, ?, ?, ?) +2017-07-06 16:11:14: ["0b197042f5954cb59f3005e18ffeb4ee","8ca68ac28a0840aeb762c02379a5003a",1499353874510,"ede96a6d712847acb252cd6c0cddc3e3",1499353874510] +2017-07-06 16:11:14: SELECT note_id FROM note_tags WHERE tag_id = ? +2017-07-06 16:11:14: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:14: Starting synchronization... [1499353874679] +2017-07-06 16:11:14: mkdir /root/.sync +2017-07-06 16:11:14: mkdir /root/.resource +2017-07-06 16:11:14: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:14: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:14: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:14: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:14: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:14: stat /root/8caaa9d2da6a4646925d57bf235002d3.md +2017-07-06 16:11:14: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local 8caaa9d2da6a4646925d57bf235002d3) +2017-07-06 16:11:14: put /root/.sync/8caaa9d2da6a4646925d57bf235002d3.md_1499353874748 +2017-07-06 16:11:14: setTimestamp /root/.sync/8caaa9d2da6a4646925d57bf235002d3.md_1499353874748 +2017-07-06 16:11:14: move /root/.sync/8caaa9d2da6a4646925d57bf235002d3.md_1499353874748 => /root/8caaa9d2da6a4646925d57bf235002d3.md +2017-07-06 16:11:14: UPDATE `note_tags` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:14: [1499353874762,"8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:14: stat /root/ede96a6d712847acb252cd6c0cddc3e3.md +2017-07-06 16:11:14: Sync: createRemote: remote does not exist, and local is new and has never been synced: (Local ede96a6d712847acb252cd6c0cddc3e3) +2017-07-06 16:11:14: put /root/.sync/ede96a6d712847acb252cd6c0cddc3e3.md_1499353874933 +2017-07-06 16:11:14: setTimestamp /root/.sync/ede96a6d712847acb252cd6c0cddc3e3.md_1499353874933 +2017-07-06 16:11:14: move /root/.sync/ede96a6d712847acb252cd6c0cddc3e3.md_1499353874933 => /root/ede96a6d712847acb252cd6c0cddc3e3.md +2017-07-06 16:11:14: UPDATE `note_tags` SET `sync_time`=? WHERE id=? +2017-07-06 16:11:14: [1499353874964,"ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:15: SELECT * FROM deleted_items +2017-07-06 16:11:15: list /root +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:15: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:15: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:15: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:15: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:15: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:15: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:15: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:15: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:15: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:15: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:15: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:15: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:15: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:15: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:15: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:15: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:15: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:15: Synchronization complete [1499353874679]: +2017-07-06 16:11:15: remotesToUpdate: 2 +2017-07-06 16:11:15: remotesToDelete: - +2017-07-06 16:11:15: localsToUdpate: - +2017-07-06 16:11:15: localsToDelete: - +2017-07-06 16:11:15: createLocal: - +2017-07-06 16:11:15: updateLocal: - +2017-07-06 16:11:15: deleteLocal: - +2017-07-06 16:11:15: createRemote: 2 +2017-07-06 16:11:15: updateRemote: - +2017-07-06 16:11:15: deleteRemote: - +2017-07-06 16:11:15: itemConflict: - +2017-07-06 16:11:15: noteConflict: - +2017-07-06 16:11:15: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:15: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:15: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:15: Total folders: 1 +2017-07-06 16:11:15: Total notes: 2 +2017-07-06 16:11:15: Total resources: 0 +2017-07-06 16:11:15: SELECT * FROM settings +2017-07-06 16:11:15: Starting synchronization... [1499353875620] +2017-07-06 16:11:15: mkdir /root/.sync +2017-07-06 16:11:15: mkdir /root/.resource +2017-07-06 16:11:15: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:15: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:15: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:15: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:15: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:15: SELECT * FROM deleted_items +2017-07-06 16:11:15: list /root +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:15: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:15: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:15: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:15: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:15: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:15: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:15: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:15: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:15: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:15: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:15: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:15: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:15: get /root/8caaa9d2da6a4646925d57bf235002d3.md +2017-07-06 16:11:15: INSERT INTO `note_tags` (`id`, `note_id`, `tag_id`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?, ?) +2017-07-06 16:11:15: ["8caaa9d2da6a4646925d57bf235002d3","2671dd68eba64e90a75db6711f89ab36","8ca68ac28a0840aeb762c02379a5003a","1499353874233","1499353874233",1499353875799] +2017-07-06 16:11:15: Sync: createLocal: remote exists but local does not: (Remote 8caaa9d2da6a4646925d57bf235002d3) +2017-07-06 16:11:15: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:15: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:15: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:15: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:16: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:16: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:16: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:16: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:16: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:16: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:16: get /root/ede96a6d712847acb252cd6c0cddc3e3.md +2017-07-06 16:11:16: INSERT INTO `note_tags` (`id`, `note_id`, `tag_id`, `created_time`, `updated_time`, `sync_time`) VALUES (?, ?, ?, ?, ?, ?) +2017-07-06 16:11:16: ["ede96a6d712847acb252cd6c0cddc3e3","0b197042f5954cb59f3005e18ffeb4ee","8ca68ac28a0840aeb762c02379a5003a","1499353874510","1499353874510",1499353876035] +2017-07-06 16:11:16: Sync: createLocal: remote exists but local does not: (Remote ede96a6d712847acb252cd6c0cddc3e3) +2017-07-06 16:11:16: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:16: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:16: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:16: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:16: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:16: Synchronization complete [1499353875620]: +2017-07-06 16:11:16: remotesToUpdate: - +2017-07-06 16:11:16: remotesToDelete: - +2017-07-06 16:11:16: localsToUdpate: 2 +2017-07-06 16:11:16: localsToDelete: - +2017-07-06 16:11:16: createLocal: 2 +2017-07-06 16:11:16: updateLocal: - +2017-07-06 16:11:16: deleteLocal: - +2017-07-06 16:11:16: createRemote: - +2017-07-06 16:11:16: updateRemote: - +2017-07-06 16:11:16: deleteRemote: - +2017-07-06 16:11:16: itemConflict: - +2017-07-06 16:11:16: noteConflict: - +2017-07-06 16:11:16: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:16: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:16: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:16: Total folders: 1 +2017-07-06 16:11:16: Total notes: 2 +2017-07-06 16:11:16: Total resources: 0 +2017-07-06 16:11:16: SELECT note_id FROM note_tags WHERE tag_id = ? +2017-07-06 16:11:16: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:16: SELECT id FROM note_tags WHERE tag_id = ? and note_id = ? +2017-07-06 16:11:16: ["8ca68ac28a0840aeb762c02379a5003a","2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:16: DELETE FROM note_tags WHERE id = ? +2017-07-06 16:11:16: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:16: INSERT INTO deleted_items (item_type, item_id, deleted_time) VALUES (?, ?, ?) +2017-07-06 16:11:16: [6,"8caaa9d2da6a4646925d57bf235002d3",1499353876555] +2017-07-06 16:11:16: SELECT note_id FROM note_tags WHERE tag_id = ? +2017-07-06 16:11:16: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:16: Starting synchronization... [1499353876707] +2017-07-06 16:11:16: mkdir /root/.sync +2017-07-06 16:11:16: mkdir /root/.resource +2017-07-06 16:11:16: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:16: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:16: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:16: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:16: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:16: SELECT * FROM deleted_items +2017-07-06 16:11:16: Sync: deleteRemote: local has been deleted: (Remote 8caaa9d2da6a4646925d57bf235002d3) +2017-07-06 16:11:16: delete /root/8caaa9d2da6a4646925d57bf235002d3.md +2017-07-06 16:11:16: DELETE FROM deleted_items WHERE item_id = ? +2017-07-06 16:11:16: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:16: list /root +2017-07-06 16:11:16: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:16: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:16: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:16: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:16: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:16: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:16: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:16: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:16: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:16: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:16: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:17: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:17: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:17: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:17: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:17: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:17: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:17: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:17: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:17: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:17: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:17: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:17: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:17: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:17: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:17: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:17: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:17: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:17: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:17: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:17: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:17: Synchronization complete [1499353876707]: +2017-07-06 16:11:17: remotesToUpdate: - +2017-07-06 16:11:17: remotesToDelete: 1 +2017-07-06 16:11:17: localsToUdpate: - +2017-07-06 16:11:17: localsToDelete: - +2017-07-06 16:11:17: createLocal: - +2017-07-06 16:11:17: updateLocal: - +2017-07-06 16:11:17: deleteLocal: - +2017-07-06 16:11:17: createRemote: - +2017-07-06 16:11:17: updateRemote: - +2017-07-06 16:11:17: deleteRemote: 1 +2017-07-06 16:11:17: itemConflict: - +2017-07-06 16:11:17: noteConflict: - +2017-07-06 16:11:17: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:17: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:17: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:17: Total folders: 1 +2017-07-06 16:11:17: Total notes: 2 +2017-07-06 16:11:17: Total resources: 0 +2017-07-06 16:11:17: SELECT * FROM settings +2017-07-06 16:11:17: Starting synchronization... [1499353877379] +2017-07-06 16:11:17: mkdir /root/.sync +2017-07-06 16:11:17: mkdir /root/.resource +2017-07-06 16:11:17: SELECT * FROM folders WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:17: SELECT * FROM resources WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:17: SELECT * FROM notes WHERE sync_time < updated_time AND is_conflict = 0 LIMIT 100 +2017-07-06 16:11:17: SELECT * FROM tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:17: SELECT * FROM note_tags WHERE sync_time < updated_time LIMIT 100 +2017-07-06 16:11:17: SELECT * FROM deleted_items +2017-07-06 16:11:17: list /root +2017-07-06 16:11:17: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:17: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:17: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:17: ["e388fa9d52d74736822bccf5a6e7b512"] +2017-07-06 16:11:17: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:17: ["2671dd68eba64e90a75db6711f89ab36"] +2017-07-06 16:11:17: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:17: ["0b197042f5954cb59f3005e18ffeb4ee"] +2017-07-06 16:11:17: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:17: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:17: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:17: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:17: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:17: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:17: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:17: ["8ca68ac28a0840aeb762c02379a5003a"] +2017-07-06 16:11:17: SELECT * FROM `notes` WHERE `id` = ? +2017-07-06 16:11:17: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:17: SELECT * FROM `folders` WHERE `id` = ? +2017-07-06 16:11:17: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:17: SELECT * FROM `resources` WHERE `id` = ? +2017-07-06 16:11:17: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:17: SELECT * FROM `tags` WHERE `id` = ? +2017-07-06 16:11:17: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:17: SELECT * FROM `note_tags` WHERE `id` = ? +2017-07-06 16:11:17: ["ede96a6d712847acb252cd6c0cddc3e3"] +2017-07-06 16:11:17: SELECT id FROM folders WHERE sync_time > 0 +2017-07-06 16:11:17: SELECT id FROM notes WHERE is_conflict = 0 AND sync_time > 0 +2017-07-06 16:11:17: SELECT id FROM resources WHERE sync_time > 0 +2017-07-06 16:11:17: SELECT id FROM tags WHERE sync_time > 0 +2017-07-06 16:11:17: SELECT id FROM note_tags WHERE sync_time > 0 +2017-07-06 16:11:17: Sync: deleteLocal: remote has been deleted: (Local 8caaa9d2da6a4646925d57bf235002d3) +2017-07-06 16:11:17: DELETE FROM note_tags WHERE id = ? +2017-07-06 16:11:17: ["8caaa9d2da6a4646925d57bf235002d3"] +2017-07-06 16:11:17: Synchronization complete [1499353877379]: +2017-07-06 16:11:17: remotesToUpdate: - +2017-07-06 16:11:17: remotesToDelete: - +2017-07-06 16:11:17: localsToUdpate: - +2017-07-06 16:11:17: localsToDelete: 1 +2017-07-06 16:11:17: createLocal: - +2017-07-06 16:11:17: updateLocal: - +2017-07-06 16:11:17: deleteLocal: 1 +2017-07-06 16:11:17: createRemote: - +2017-07-06 16:11:17: updateRemote: - +2017-07-06 16:11:17: deleteRemote: - +2017-07-06 16:11:17: itemConflict: - +2017-07-06 16:11:17: noteConflict: - +2017-07-06 16:11:17: SELECT count(*) as total FROM `folders` +2017-07-06 16:11:17: SELECT count(*) as total FROM `notes` +2017-07-06 16:11:17: SELECT count(*) as total FROM `resources` +2017-07-06 16:11:17: Total folders: 1 +2017-07-06 16:11:17: Total notes: 2 +2017-07-06 16:11:17: Total resources: 0 +2017-07-06 16:11:17: SELECT note_id FROM note_tags WHERE tag_id = ? +2017-07-06 16:11:17: ["8ca68ac28a0840aeb762c02379a5003a"] diff --git a/CliClient/tests/test-utils.js b/CliClient/tests/test-utils.js index a12b53b87..758095944 100644 --- a/CliClient/tests/test-utils.js +++ b/CliClient/tests/test-utils.js @@ -5,6 +5,8 @@ import { BaseModel } from 'lib/base-model.js'; import { Folder } from 'lib/models/folder.js'; import { Note } from 'lib/models/note.js'; import { Resource } from 'lib/models/resource.js'; +import { Tag } from 'lib/models/tag.js'; +import { NoteTag } from 'lib/models/note-tag.js'; import { Logger } from 'lib/logger.js'; import { Setting } from 'lib/models/setting.js'; import { BaseItem } from 'lib/models/base-item.js'; @@ -25,9 +27,14 @@ Resource.fsDriver_ = fsDriver; const logger = new Logger(); logger.addTarget('file', { path: __dirname + '/../tests/logs/log.txt' }); -//logger.addTarget('console'); logger.setLevel(Logger.LEVEL_DEBUG); +BaseItem.loadClass('Note', Note); +BaseItem.loadClass('Folder', Folder); +BaseItem.loadClass('Resource', Resource); +BaseItem.loadClass('Tag', Tag); +BaseItem.loadClass('NoteTag', NoteTag); + function sleep(n) { return new Promise((resolve, reject) => { setTimeout(() => { diff --git a/ReactNativeClient/lib/models/base-item.js b/ReactNativeClient/lib/models/base-item.js index 705b23d9e..05b183a22 100644 --- a/ReactNativeClient/lib/models/base-item.js +++ b/ReactNativeClient/lib/models/base-item.js @@ -9,14 +9,33 @@ class BaseItem extends BaseModel { return true; } + static loadClass(className, classRef) { + for (let i = 0; i < BaseItem.syncItemDefinitions_.length; i++) { + if (BaseItem.syncItemDefinitions_[i].className == className) { + BaseItem.syncItemDefinitions_[i].classRef = classRef; + return; + } + } + + throw new Error('Invalid class name: ' + className); + } + // Need to dynamically load the classes like this to avoid circular dependencies static getClass(name) { - if (!this.classes_) this.classes_ = {}; - if (this.classes_[name]) return this.classes_[name]; - let filename = name.toLowerCase(); - if (name == 'NoteTag') filename = 'note-tag'; - this.classes_[name] = require('lib/models/' + filename + '.js')[name]; - return this.classes_[name]; + for (let i = 0; i < BaseItem.syncItemDefinitions_.length; i++) { + if (BaseItem.syncItemDefinitions_[i].className == name) { + return BaseItem.syncItemDefinitions_[i].classRef; + } + } + + throw new Error('Invalid class name: ' + name); + + // if (!this.classes_) this.classes_ = {}; + // if (this.classes_[name]) return this.classes_[name]; + // let filename = name.toLowerCase(); + // if (name == 'NoteTag') filename = 'note-tag'; + // this.classes_[name] = require('lib/models/' + filename + '.js')[name]; + // return this.classes_[name]; } static systemPath(itemOrId) { @@ -229,6 +248,12 @@ class BaseItem extends BaseModel { } +// import { Note } from 'lib/models/note.js'; +// import { Folder } from 'lib/models/folder.js'; +// import { Resource } from 'lib/models/resource.js'; +// import { Tag } from 'lib/models/tag.js'; +// import { NoteTag } from 'lib/models/note-tag.js'; + // Also update: // - itemsThatNeedSync() // - syncedItems() diff --git a/ReactNativeClient/lib/onedrive-api.js b/ReactNativeClient/lib/onedrive-api.js index 61101c97e..6801d9f02 100644 --- a/ReactNativeClient/lib/onedrive-api.js +++ b/ReactNativeClient/lib/onedrive-api.js @@ -1,5 +1,6 @@ import { shim } from 'lib/shim.js'; import { stringify } from 'query-string'; +import { time } from 'lib/time-utils.js'; class OneDriveApi { @@ -133,15 +134,6 @@ class OneDriveApi { if (data) options.body = data; - // Rare error (one Google hit) - maybe repeat the request when it happens? - - // { error: - // { code: 'generalException', - // message: 'An error occurred in the data store.', - // innerError: - // { 'request-id': 'b4310552-c18a-45b1-bde1-68e2c2345eef', - // date: '2017-06-29T00:15:50' } } } - for (let i = 0; i < 5; i++) { options.headers['Authorization'] = 'bearer ' + this.token(); @@ -153,6 +145,26 @@ class OneDriveApi { if (error.code == 'InvalidAuthenticationToken') { await this.refreshAccessToken(); continue; + } else if (error && ((error.error && error.error.code == 'generalException') || (error.code == 'generalException'))) { + // Rare error (one Google hit) - I guess the request can be repeated + + // { error: + // { code: 'generalException', + // message: 'An error occurred in the data store.', + // innerError: + // { 'request-id': 'b4310552-c18a-45b1-bde1-68e2c2345eef', + // date: '2017-06-29T00:15:50' } } } + await time.msleep(1000 * i); + continue; + } else if (error.code == 'EAGAIN') { + // { FetchError: request to https://graph.microsoft.com/v1.0/drive/root:/Apps/Joplin/.sync/7ee5dc04afcb414aa7c684bfc1edba8b.md_1499352102856 failed, reason: connect EAGAIN 65.52.64.250:443 - Local (0.0.0.0:54374) + // name: 'FetchError', + // message: 'request to https://graph.microsoft.com/v1.0/drive/root:/Apps/Joplin/.sync/7ee5dc04afcb414aa7c684bfc1edba8b.md_1499352102856 failed, reason: connect EAGAIN 65.52.64.250:443 - Local (0.0.0.0:54374)', + // type: 'system', + // errno: 'EAGAIN', + // code: 'EAGAIN' } + await time.msleep(1000 * i); + continue; } else { error.request = method + ' ' + url + ' ' + JSON.stringify(query) + ' ' + JSON.stringify(data) + ' ' + JSON.stringify(options); throw error; diff --git a/ReactNativeClient/lib/synchronizer.js b/ReactNativeClient/lib/synchronizer.js index 3875fd16a..93e813c38 100644 --- a/ReactNativeClient/lib/synchronizer.js +++ b/ReactNativeClient/lib/synchronizer.js @@ -313,12 +313,12 @@ class Synchronizer { }; if (action == 'createLocal') options.isNew = true; - if (newContent.type_ == BaseModel.TYPE_RESOURCE && action == 'createLocal') { - let localResourceContentPath = Resource.fullPath(newContent); - let remoteResourceContentPath = this.resourceDirName_ + '/' + newContent.id; - let remoteResourceContent = await this.api().get(remoteResourceContentPath, { encoding: 'binary' }); - await Resource.setContent(newContent, remoteResourceContent); - } + // if (newContent.type_ == BaseModel.TYPE_RESOURCE && action == 'createLocal') { + // let localResourceContentPath = Resource.fullPath(newContent); + // let remoteResourceContentPath = this.resourceDirName_ + '/' + newContent.id; + // let remoteResourceContent = await this.api().get(remoteResourceContentPath, { encoding: 'binary' }); + // await Resource.setContent(newContent, remoteResourceContent); + // } await ItemClass.save(newContent, options); diff --git a/ReactNativeClient/root.js b/ReactNativeClient/root.js index 6fb5a2895..08eaf16cd 100644 --- a/ReactNativeClient/root.js +++ b/ReactNativeClient/root.js @@ -9,6 +9,10 @@ import { addNavigationHelpers } from 'react-navigation'; import { Log } from 'lib/log.js' import { Note } from 'lib/models/note.js' import { Folder } from 'lib/models/folder.js' +import { Resource } from 'lib/models/resource.js' +import { Tag } from 'lib/models/tag.js' +import { NoteTag } from 'lib/models/note-tag.js' +import { BaseItem } from 'lib/models/base-item.js' import { BaseModel } from 'lib/base-model.js' import { Database } from 'lib/database.js' import { ItemList } from 'lib/components/item-list.js' @@ -199,7 +203,13 @@ class AppComponent extends React.Component { NotesScreenUtils.dispatch = this.props.dispatch; BaseModel.db_ = db; - db.open({ name: '/storage/emulated/0/Download/joplin-43.sqlite' }).then(() => { + BaseItem.loadClass('Note', Note); + BaseItem.loadClass('Folder', Folder); + BaseItem.loadClass('Resource', Resource); + BaseItem.loadClass('Tag', Tag); + BaseItem.loadClass('NoteTag', NoteTag); + + db.open({ name: '/storage/emulated/0/Download/joplin-44.sqlite' }).then(() => { Log.info('Database is ready.'); }).then(() => { Log.info('Loading settings...');