mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
renamed attachment's parentId to more fitting ownerId
This commit is contained in:
@@ -8,7 +8,7 @@ function getNoteSize(req) {
|
||||
SELECT blobs.blobId, LENGTH(content)
|
||||
FROM blobs
|
||||
LEFT JOIN notes ON notes.blobId = blobs.blobId AND notes.noteId = ? AND notes.isDeleted = 0
|
||||
LEFT JOIN attachments ON attachments.blobId = blobs.blobId AND attachments.parentId = ? AND attachments.isDeleted = 0
|
||||
LEFT JOIN attachments ON attachments.blobId = blobs.blobId AND attachments.ownerId = ? AND attachments.isDeleted = 0
|
||||
LEFT JOIN revisions ON revisions.blobId = blobs.blobId AND revisions.noteId = ?
|
||||
WHERE notes.noteId IS NOT NULL
|
||||
OR attachments.attachmentId IS NOT NULL
|
||||
@@ -32,7 +32,7 @@ function getSubtreeSize(req) {
|
||||
SELECT blobs.blobId, LENGTH(content)
|
||||
FROM param_list
|
||||
JOIN notes ON notes.noteId = param_list.paramId AND notes.isDeleted = 0
|
||||
LEFT JOIN attachments ON attachments.parentId = param_list.paramId AND attachments.isDeleted = 0
|
||||
LEFT JOIN attachments ON attachments.ownerId = param_list.paramId AND attachments.isDeleted = 0
|
||||
LEFT JOIN revisions ON revisions.noteId = param_list.paramId
|
||||
JOIN blobs ON blobs.blobId = notes.blobId OR blobs.blobId = attachments.blobId OR blobs.blobId = revisions.blobId`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user