Back to Trilium

attachments

docs/Developer Guide/Developer Guide/Architecture/Database/Database structure/attachments.md

0.104.11.4 KB
Original Source

attachments

Column NameData TypeNullityDefault valueDescription
attachmentIdTextNon-nullUnique ID (e.g. qhC1vzU4nwSE)
ownerIdTextNon-nullThe unique ID of a row in <a class="reference-link" href="notes.md">notes</a>.
roleTextNon-nullThe role of the attachment: image for images that are attached to a note, file for uploaded files.
mimeTextNon-nullThe MIME type of the attachment (e.g. image/png)
titleTextNon-nullThe title of the attachment.
isProtectedIntegerNon-null01 if the entity is protected, 0 otherwise.
positionIntegerNon-null0Not sure where the position is relevant for attachments (saw it with values of 10 and 0).
blobIdTextNullablenullThe corresponding blobId from the <a class="reference-link" href="blobs.md">blobs</a> table.
dateModifiedTextNon-nullLocalized modification date (e.g. 2023-11-08 18:43:44.204+0200)
utcDateModifiedTextNon-nullModification date in UTC format (e.g. 2023-11-08 16:43:44.204Z)
utcDateScheduledForErasureTextNullablenull
isDeletedIntegerNon-null1 if the entity is deleted, 0 otherwise.
deleteIdTextNullablenull