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