migration script to fix contentLength = -1 in new notes

This commit is contained in:
zadam 2020-01-19 09:08:33 +01:00
parent cbeb8ea17e
commit 1690248e24
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
UPDATE notes SET contentLength = COALESCE((SELECT COALESCE(LENGTH(content), 0) FROM note_contents WHERE note_contents.noteId = notes.noteId), -1);

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 = 156;
const APP_DB_VERSION = 157;
const SYNC_VERSION = 14;
const CLIPPER_PROTOCOL_VERSION = "1.0";