Merge branch 'master' into next53

This commit is contained in:
zadam 2022-06-06 22:27:21 +02:00
commit 51bbc23270
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,6 @@ const entityChangesService = require('../../services/entity_changes');
const AbstractEntity = require("./abstract_entity");
const NoteRevision = require("./note_revision");
const TaskContext = require("../../services/task_context");
const handlers = require("../../services/handlers");
const LABEL = 'label';
const RELATION = 'relation';
@ -1143,6 +1142,7 @@ class Note extends AbstractEntity {
}
// needs to be run before branches and attributes are deleted and thus attached relations disappear
const handlers = require("../../services/handlers");
handlers.runAttachedRelations(this, 'runOnNoteDeletion', this);
taskContext.noteDeletionHandlerTriggered = true;

View File

@ -102,7 +102,7 @@ function isDbUpToDate() {
async function migrateIfNecessary() {
const currentDbVersion = getDbVersion();
if (currentDbVersion > appInfo.dbVersion) {
if (currentDbVersion > appInfo.dbVersion && process.env.TRILIUM_IGNORE_DB_VERSION !== 'true') {
log.error(`Current DB version ${currentDbVersion} is newer than app db version ${appInfo.dbVersion} which means that it was created by newer and incompatible version of Trilium. Upgrade to latest version of Trilium to resolve this issue.`);
utils.crash();