Added token category option

This commit is contained in:
Mitchell McCaffrey
2020-08-27 19:09:16 +10:00
parent a912163079
commit 3c27f65d0f
7 changed files with 70 additions and 25 deletions

View File

@@ -172,6 +172,18 @@ function loadVersions(db) {
}
});
});
// v1.5.1 - Added token prop category and remove isVehicle bool
db.version(10)
.stores({})
.upgrade((tx) => {
return tx
.table("tokens")
.toCollection()
.modify((token) => {
token.category = token.isVehicle ? "vehicle" : "character";
delete token.isVehicle;
});
});
}
// Get the dexie database used in DatabaseContext