From 527a14dd0ad09c162a06b84e29832ba5b34e0ae3 Mon Sep 17 00:00:00 2001 From: silas Date: Mon, 5 Nov 2018 14:48:41 +0100 Subject: [PATCH] db repaired --- src/module/Application/pwa/js/WordRotatorDb.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/module/Application/pwa/js/WordRotatorDb.js b/src/module/Application/pwa/js/WordRotatorDb.js index 04fe4c2..c38520b 100755 --- a/src/module/Application/pwa/js/WordRotatorDb.js +++ b/src/module/Application/pwa/js/WordRotatorDb.js @@ -24,14 +24,14 @@ export class WordRotatorDb extends MyDb { let levelObjectStore = e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.LEVEL); levelObjectStore.createIndex("played", ["deleted", "played", "difficulty", "id"], {"unique": false}); } - // xhklsfdbnk = 42; if (Helper.isNull(oldVersion) || oldVersion < 3 && newVersion >= 3) { let levelObjectStore = e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.LEVEL); levelObjectStore.createIndex("difficulty", "difficulty", {"unique": false}); } - if (Helper.isNull(oldVersion) || oldVersion < 5 && newVersion >= 5) { - if (!e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.LEVEL)){ + console.log("update", oldVersion, newVersion); + if (Helper.isNull(oldVersion) || oldVersion < 6 && newVersion >= 6) { + if (!e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.SYSTEM_VARS)){ let levelObjectStore = db.createObjectStore(WordRotatorDb.OBJECT_STORE.SYSTEM_VARS, {"keyPath": "name"}); } }