trilium/db/migrations/0217__attachments.sql

17 lines
543 B
SQL

CREATE TABLE IF NOT EXISTS "attachments"
(
attachmentId TEXT not null primary key,
parentId TEXT not null,
role TEXT not null,
mime TEXT not null,
title TEXT not null,
isProtected INT not null DEFAULT 0,
blobId TEXT not null,
utcDateScheduledForDeletionSince TEXT DEFAULT NULL,
utcDateModified TEXT not null,
isDeleted INT not null,
deleteId TEXT DEFAULT NULL);
CREATE UNIQUE INDEX IDX_attachments_parentId_role
on attachments (parentId, role);