db repaired
This commit is contained in:
parent
c656da15b5
commit
527a14dd0a
@ -24,14 +24,14 @@ export class WordRotatorDb extends MyDb {
|
|||||||
let levelObjectStore = e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.LEVEL);
|
let levelObjectStore = e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.LEVEL);
|
||||||
levelObjectStore.createIndex("played", ["deleted", "played", "difficulty", "id"], {"unique": false});
|
levelObjectStore.createIndex("played", ["deleted", "played", "difficulty", "id"], {"unique": false});
|
||||||
}
|
}
|
||||||
// xhklsfdbnk = 42;
|
|
||||||
if (Helper.isNull(oldVersion) || oldVersion < 3 && newVersion >= 3) {
|
if (Helper.isNull(oldVersion) || oldVersion < 3 && newVersion >= 3) {
|
||||||
let levelObjectStore = e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.LEVEL);
|
let levelObjectStore = e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.LEVEL);
|
||||||
levelObjectStore.createIndex("difficulty", "difficulty", {"unique": false});
|
levelObjectStore.createIndex("difficulty", "difficulty", {"unique": false});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Helper.isNull(oldVersion) || oldVersion < 5 && newVersion >= 5) {
|
console.log("update", oldVersion, newVersion);
|
||||||
if (!e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.LEVEL)){
|
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"});
|
let levelObjectStore = db.createObjectStore(WordRotatorDb.OBJECT_STORE.SYSTEM_VARS, {"keyPath": "name"});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user