mirror of
https://github.com/zadam/trilium.git
synced 2025-09-07 07:06:21 +08:00
fix migration for DBs which did not have _hidden tree created, closes #3536
This commit is contained in:
parent
ef825371cf
commit
a3149aecf4
2 changed files with 3 additions and 3 deletions
|
@ -7,6 +7,6 @@ module.exports = () => {
|
|||
beccaLoader.load();
|
||||
// make sure the hidden subtree exists since the subsequent migrations we will move some existing notes into it (share...)
|
||||
// in previous releases hidden subtree was created lazily
|
||||
hiddenSubtreeService.checkHiddenSubtree();
|
||||
hiddenSubtreeService.checkHiddenSubtree(true);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -234,8 +234,8 @@ const HIDDEN_SUBTREE_DEFINITION = {
|
|||
]
|
||||
};
|
||||
|
||||
function checkHiddenSubtree() {
|
||||
if (!migrationService.isDbUpToDate()) {
|
||||
function checkHiddenSubtree(force = false) {
|
||||
if (!force && !migrationService.isDbUpToDate()) {
|
||||
// on-delete hook might get triggered during some future migration and cause havoc
|
||||
log.info("Will not check hidden subtree until migration is finished.");
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue