mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
20 lines
764 B
MySQL
20 lines
764 B
MySQL
![]() |
CREATE TABLE IF NOT EXISTS "note_attachments"
|
||
|
(
|
||
|
noteAttachmentId TEXT not null primary key,
|
||
|
noteId TEXT not null,
|
||
|
name TEXT not null,
|
||
|
mime TEXT not null,
|
||
|
isProtected INT not null DEFAULT 0,
|
||
|
utcDateModified TEXT not null,
|
||
|
isDeleted INT not null,
|
||
|
`deleteId` TEXT DEFAULT NULL);
|
||
|
|
||
|
CREATE TABLE IF NOT EXISTS "note_attachment_contents" (`noteAttachmentId` TEXT NOT NULL PRIMARY KEY,
|
||
|
`content` TEXT DEFAULT NULL,
|
||
|
`utcDateModified` TEXT NOT NULL);
|
||
|
|
||
|
CREATE INDEX IDX_note_attachments_name
|
||
|
on note_attachments (name);
|
||
|
CREATE INDEX IDX_note_attachments_noteId
|
||
|
on note_attachments (noteId);
|