added migration to add excludeFromTreeMap for journal subtrees

This commit is contained in:
zadam
2021-09-23 22:08:23 +02:00
parent fabf24a065
commit b041d081db
7 changed files with 71 additions and 17 deletions

View File

@@ -233,8 +233,6 @@ class Note extends AbstractEntity {
}
}
console.log("POJO update", pojo);
sql.upsert("note_contents", "noteId", pojo);
const hash = utils.hash(this.noteId + "|" + pojo.content.toString());

View File

@@ -174,7 +174,7 @@ class Froca {
return;
}
const searchResultNoteIds = await server.get('special-notes/search-note/' + note.noteId);
const searchResultNoteIds = await server.get('search-note/' + note.noteId);
if (!Array.isArray(searchResultNoteIds)) {
throw new Error(`Search note ${note.noteId} failed: ${searchResultNoteIds}`);

View File

@@ -4,7 +4,7 @@ const build = require('./build');
const packageJson = require('../../package');
const {TRILIUM_DATA_DIR} = require('./data_dir');
const APP_DB_VERSION = 183;
const APP_DB_VERSION = 184;
const SYNC_VERSION = 21;
const CLIPPER_PROTOCOL_VERSION = "1.0";

View File

@@ -32,7 +32,14 @@ async function migrate() {
// backup before attempting migration
await backupService.backupNow("before-migration");
const currentDbVersion = parseInt(optionService.getOption('dbVersion'));
const currentDbVersion = getDbVersion();
if (currentDbVersion < 183) {
log.error("Direct migration from your current version is not supported. Please upgrade to the latest v0.47.X first and only then to this version.");
utils.crash();
return;
}
fs.readdirSync(resourceDir.MIGRATIONS_DIR).forEach(file => {
const match = file.match(/([0-9]{4})__([a-zA-Z0-9_ ]+)\.(sql|js)/);