mirror of
https://github.com/zadam/trilium.git
synced 2025-02-20 21:13:11 +08:00
fix setting isErased after note migration
This commit is contained in:
parent
4ba7e74b58
commit
7bd1d8feb4
2 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ DROP TABLE notes;
|
|||
ALTER TABLE notes_mig RENAME TO notes;
|
||||
|
||||
UPDATE notes SET isErased = 1 WHERE isDeleted = 1
|
||||
AND (SELECT CASE content WHEN NULL THEN 1 ELSE 0 END FROM note_contents WHERE note_contents.noteId = notes.noteId);
|
||||
AND 1=(SELECT CASE content WHEN NULL THEN 1 ELSE 0 END FROM note_contents WHERE note_contents.noteId = notes.noteId);
|
||||
|
||||
CREATE INDEX `IDX_notes_isDeleted` ON `notes` (`isDeleted`);
|
||||
CREATE INDEX `IDX_notes_title` ON `notes` (`title`);
|
||||
|
|
|
@ -364,7 +364,7 @@ async function findLogicIssues() {
|
|||
AND content IS NULL`,
|
||||
async ({noteRevisionId}, autoFix) => {
|
||||
if (autoFix) {
|
||||
const noteRevision = await repository.getNote(noteRevisionId);
|
||||
const noteRevision = await repository.getNoteRevision(noteRevisionId);
|
||||
await noteRevision.setContent('');
|
||||
|
||||
logFix(`Note revision ${noteRevisionId} content was set to empty string since it was null even though it is not erased`);
|
||||
|
|
Loading…
Reference in a new issue