db repaired
This commit is contained in:
parent
71bde38da4
commit
c656da15b5
@ -11,7 +11,7 @@ export class WordRotatorDb extends MyDb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("wordRotator", 4);
|
super("wordRotator", 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
upgrade(db, oldVersion, newVersion, e) {
|
upgrade(db, oldVersion, newVersion, e) {
|
||||||
@ -30,8 +30,10 @@ export class WordRotatorDb extends MyDb {
|
|||||||
levelObjectStore.createIndex("difficulty", "difficulty", {"unique": false});
|
levelObjectStore.createIndex("difficulty", "difficulty", {"unique": false});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Helper.isNull(oldVersion) || oldVersion < 3 && newVersion >= 4) {
|
if (Helper.isNull(oldVersion) || oldVersion < 5 && newVersion >= 5) {
|
||||||
let levelObjectStore = db.createObjectStore(WordRotatorDb.OBJECT_STORE.SYSTEM_VARS, {"keyPath": "name"});
|
if (!e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.LEVEL)){
|
||||||
|
let levelObjectStore = db.createObjectStore(WordRotatorDb.OBJECT_STORE.SYSTEM_VARS, {"keyPath": "name"});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user