mirror of
https://github.com/zadam/trilium.git
synced 2025-02-20 21:13:11 +08:00
fix migration script in case of not fully consistent database (missing note_contents for note). closes #717
This commit is contained in:
parent
38e7649ac3
commit
c8ba07a4ae
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ SELECT noteId, title, -1, isProtected, type, mime, hash, isDeleted, isErased, da
|
|||
DROP TABLE notes;
|
||||
ALTER TABLE notes_mig RENAME TO notes;
|
||||
|
||||
UPDATE notes SET contentLength = (SELECT COALESCE(LENGTH(content), 0) FROM note_contents WHERE note_contents.noteId = notes.noteId);
|
||||
UPDATE notes SET contentLength = COALESCE((SELECT COALESCE(LENGTH(content), 0) FROM note_contents WHERE note_contents.noteId = notes.noteId), -1);
|
||||
|
||||
CREATE INDEX `IDX_notes_isDeleted` ON `notes` (`isDeleted`);
|
||||
CREATE INDEX `IDX_notes_title` ON `notes` (`title`);
|
||||
|
|
Loading…
Reference in a new issue