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