Skip to content

Commit

Permalink
upgrade db version
Browse files Browse the repository at this point in the history
  • Loading branch information
battlecatsinfo committed Nov 14, 2024
1 parent a88dbfb commit 02857be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion data/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"taiwan": "13.7",
"japan": "14.0",
"db_ver": 1400002
"db_ver": 1400003
}
10 changes: 5 additions & 5 deletions template/js/common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ class IdbBase {
db.deleteObjectStore(name);
db.createObjectStore(name, {keyPath: "i"});
}

if (stores.has("scheme"))
db.deleteObjectStore("scheme");
db.createObjectStore("scheme");
}

if (oldVersion < 1400002 || 1400010 < newVersion) {
if (oldVersion < 1400003 || 1400003 < newVersion) {
if (stores.has("stage"))
db.deleteObjectStore("stage");
db.createObjectStore("stage", {keyPath: "id"});

if (stores.has("map"))
db.deleteObjectStore("map");
db.createObjectStore("map", {keyPath: "id"});

if (stores.has("scheme"))
db.deleteObjectStore("scheme");
db.createObjectStore("scheme");
}

db._upgraded = true;
Expand Down

0 comments on commit 02857be

Please sign in to comment.