From 203062fc6b1416de4d9230b9401556641e2b0a24 Mon Sep 17 00:00:00 2001 From: skilion Date: Thu, 29 Dec 2016 00:36:42 +0100 Subject: [PATCH] added missing item fields in saveItem() --- src/itemdb.d | 4 ++-- src/sync.d | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/itemdb.d b/src/itemdb.d index 9b52eee0..4f5cd7f5 100644 --- a/src/itemdb.d +++ b/src/itemdb.d @@ -22,7 +22,7 @@ struct Item final class ItemDatabase { // increment this for every change in the db schema - immutable int itemDatabaseVersion = 1; + immutable int itemDatabaseVersion = 2; Database db; Statement insertItemStmt; @@ -35,7 +35,7 @@ final class ItemDatabase db = Database(filename); if (db.getVersion() == 0) { db.exec("CREATE TABLE item ( - id TEXT PRIMARY KEY, + id TEXT NOT NULL PRIMARY KEY, name TEXT NOT NULL, type TEXT NOT NULL, eTag TEXT NOT NULL, diff --git a/src/sync.d b/src/sync.d index 6dd0e284..b5f73b07 100644 --- a/src/sync.d +++ b/src/sync.d @@ -522,7 +522,9 @@ final class SyncEngine assert(0); } Item item = { + id: id, name: jsonItem["name"].str, + type: type, eTag: jsonItem["eTag"].str, cTag: "cTag" in jsonItem ? jsonItem["cTag"].str : null, mtime: SysTime.fromISOExtString(jsonItem["fileSystemInfo"]["lastModifiedDateTime"].str),