db repaired

This commit is contained in:
silas 2018-11-05 14:48:41 +01:00
parent c656da15b5
commit 527a14dd0a

View File

@ -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"});
}
}