mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 09:58:32 +02:00
fix setting isErased after note migration
This commit is contained in:
parent
4ba7e74b58
commit
7bd1d8feb4
@ -20,7 +20,7 @@ DROP TABLE notes;
|
|||||||
ALTER TABLE notes_mig RENAME TO notes;
|
ALTER TABLE notes_mig RENAME TO notes;
|
||||||
|
|
||||||
UPDATE notes SET isErased = 1 WHERE isDeleted = 1
|
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_isDeleted` ON `notes` (`isDeleted`);
|
||||||
CREATE INDEX `IDX_notes_title` ON `notes` (`title`);
|
CREATE INDEX `IDX_notes_title` ON `notes` (`title`);
|
||||||
|
@ -364,7 +364,7 @@ async function findLogicIssues() {
|
|||||||
AND content IS NULL`,
|
AND content IS NULL`,
|
||||||
async ({noteRevisionId}, autoFix) => {
|
async ({noteRevisionId}, autoFix) => {
|
||||||
if (autoFix) {
|
if (autoFix) {
|
||||||
const noteRevision = await repository.getNote(noteRevisionId);
|
const noteRevision = await repository.getNoteRevision(noteRevisionId);
|
||||||
await noteRevision.setContent('');
|
await noteRevision.setContent('');
|
||||||
|
|
||||||
logFix(`Note revision ${noteRevisionId} content was set to empty string since it was null even though it is not erased`);
|
logFix(`Note revision ${noteRevisionId} content was set to empty string since it was null even though it is not erased`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user