This commit is contained in:
zadam
2023-03-16 12:11:00 +01:00
parent dc97400dbf
commit eee05a4d01
13 changed files with 37 additions and 32 deletions

View File

@@ -217,7 +217,7 @@ class ConsistencyChecks {
this.findAndFixIssues(`
SELECT noteAttachmentId, note_attachments.noteId AS noteId
FROM note_attachments
LEFT JOIN notes USING (noteId)
LEFT JOIN notes ON notes.noteId = note_attachments.parentId
WHERE notes.noteId IS NULL
AND note_attachments.isDeleted = 0`,
({noteAttachmentId, noteId}) => {