Upgrade dexie and change try state upgrade again
This commit is contained in:
parent
4ea289a7c5
commit
5042487db1
@ -23,7 +23,7 @@
|
||||
"color": "^3.2.1",
|
||||
"comlink": "^4.3.1",
|
||||
"deep-diff": "^1.0.2",
|
||||
"dexie": "3.1.0-beta.13",
|
||||
"dexie": "^3.2.0-beta.3",
|
||||
"dexie-react-hooks": "^1.0.7",
|
||||
"err-code": "^3.0.1",
|
||||
"fake-indexeddb": "^3.1.3",
|
||||
|
@ -356,7 +356,6 @@ function ImportExportModal({
|
||||
}
|
||||
await importDB.delete();
|
||||
importDB.close();
|
||||
db.close();
|
||||
setIsLoading(false);
|
||||
backgroundTaskRunningRef.current = false;
|
||||
}
|
||||
|
@ -897,9 +897,28 @@ export const versions: Record<number, VersionCallback> = {
|
||||
});
|
||||
});
|
||||
},
|
||||
// v1.10.0 (patch 2) - Rename drawShapes and fogShapes in state again again (some people's still didn't work)
|
||||
41(v, onUpgrade) {
|
||||
v.stores({}).upgrade((tx) => {
|
||||
onUpgrade?.(41);
|
||||
return tx
|
||||
.table("states")
|
||||
.toCollection()
|
||||
.modify((state) => {
|
||||
if (state.drawShapes) {
|
||||
state.drawings = cloneDeep(state.drawShapes);
|
||||
delete state.drawShapes;
|
||||
}
|
||||
if (state.fogShapes) {
|
||||
state.fogs = cloneDeep(state.fogShapes);
|
||||
delete state.fogShapes;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export const latestVersion = 40;
|
||||
export const latestVersion = 41;
|
||||
|
||||
/**
|
||||
* Load versions onto a database up to a specific version number
|
||||
|
10
yarn.lock
10
yarn.lock
@ -5752,16 +5752,16 @@ dexie-react-hooks@^1.0.7:
|
||||
resolved "https://registry.yarnpkg.com/dexie-react-hooks/-/dexie-react-hooks-1.0.7.tgz#50316a7829a6dfa013b8471f66b010cc77f00d3e"
|
||||
integrity sha512-hqXGFbfgu1rdfcGHQUPwW2G0iWyupoNWnk3ODvqr+HdZt2ip3y1e/dcWIOsEnlUWWCWk6a3+ok0fvECU05eE2A==
|
||||
|
||||
dexie@3.1.0-beta.13:
|
||||
version "3.1.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/dexie/-/dexie-3.1.0-beta.13.tgz#54b3438e2aca3b60f87a823a535ce1b4313056ec"
|
||||
integrity sha512-pUcX9YyX1VDjF1oMqiOys6N2zoXIA/CeTghB3P4Ee77U8n9q0qa2pmNYoHyyYPKLU58+gzsMJuOc6HLPJDQrQQ==
|
||||
|
||||
"dexie@^3.0.0-alpha.5 || ^2.0.4":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/dexie/-/dexie-3.0.3.tgz#ede63849dfe5f07e13e99bb72a040e8ac1d29dab"
|
||||
integrity sha512-BSFhGpngnCl1DOr+8YNwBDobRMH0ziJs2vts69VilwetHYOtEDcLqo7d/XiIphM0tJZ2rPPyAGd31lgH2Ln3nw==
|
||||
|
||||
dexie@^3.2.0-beta.3:
|
||||
version "3.2.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/dexie/-/dexie-3.2.0-beta.3.tgz#6e14328b2257929d93f7d597307186cb982691f7"
|
||||
integrity sha512-gfnFMoUIxXxoY8rtMaiW1ryAOJL663irbXLutPB2bFjbegIvsHGUbJf4a20eqcF0RYbBZUg6otML0pRTWAppig==
|
||||
|
||||
diff-sequences@^26.6.2:
|
||||
version "26.6.2"
|
||||
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1"
|
||||
|
Loading…
Reference in New Issue
Block a user