2023-03-16 12:17:55 +01:00
|
|
|
CREATE TABLE IF NOT EXISTS "attachments"
|
2023-03-08 09:01:23 +01:00
|
|
|
(
|
2023-03-16 12:17:55 +01:00
|
|
|
attachmentId TEXT not null primary key,
|
2023-03-16 12:11:00 +01:00
|
|
|
parentId TEXT not null,
|
|
|
|
role TEXT not null,
|
2023-03-08 09:01:23 +01:00
|
|
|
mime TEXT not null,
|
2023-03-16 12:11:00 +01:00
|
|
|
title TEXT not null,
|
2023-03-08 09:01:23 +01:00
|
|
|
isProtected INT not null DEFAULT 0,
|
2023-03-15 22:44:08 +01:00
|
|
|
blobId TEXT not null,
|
2023-03-08 09:01:23 +01:00
|
|
|
utcDateModified TEXT not null,
|
|
|
|
isDeleted INT not null,
|
2023-03-16 12:11:00 +01:00
|
|
|
deleteId TEXT DEFAULT NULL);
|
2023-03-08 09:01:23 +01:00
|
|
|
|
2023-03-16 12:17:55 +01:00
|
|
|
CREATE UNIQUE INDEX IDX_attachments_parentId_role
|
|
|
|
on attachments (parentId, role);
|