Skip to content

Build your personal knowledge base with Trilium Notes

allow ignoring DB version for skipping uncritical migrations in case of a downgrade

zadam7609bc78ec03
diff --git a/src/services/migration.js b/src/services/migration.js
index e7306a7d00..423c87cf1d 100644
--- a/src/services/migration.js
+++ b/src/services/migration.js
@@ -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();