added flag for the erased notes

This commit is contained in:
zadam
2019-11-01 22:09:51 +01:00
parent 2e58e32112
commit 2af86927b0
9 changed files with 107 additions and 25 deletions

View File

@@ -228,6 +228,23 @@ async function findLogicIssues() {
AND content IS NULL`,
({noteId}) => `Note ${noteId} content is null even though it is not deleted`);
await findIssues(`
SELECT noteId
FROM notes
JOIN note_contents USING(noteId)
WHERE
isErased = 1
AND content IS NOT NULL`,
({noteId}) => `Note ${noteId} content is not null even though the note is erased`);
await findIssues(`
SELECT noteId
FROM notes
WHERE
isErased = 1
AND isDeleted = 0`,
({noteId}) => `Note ${noteId} is not deleted even though it is erased`);
await findIssues(`
SELECT parentNoteId
FROM