forge
Explore
Log in

Don't you dare go Hollow

forge

Clone
★ 0

0 watching0 forksRustAGPL-3.07.1 MiB490f099Tahinli7 hours ago322 commits

0052_attachments.sql15 lines, 665 bytesHistoryRawDownload
1-- Files attached to issues, pull requests, comments and discussions through the markdown
2-- editors. The bytes live in blob storage under `attachments/<id>`; this row is the metadata
3-- and the repo link that access checks use. Applied by store/migrate.rs.
4
5CREATE TABLE attachments (
6 id TEXT PRIMARY KEY,
7 repo_id TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE,
8 uploader_id TEXT NOT NULL REFERENCES users(id),
9 name TEXT NOT NULL,
10 content_type TEXT NOT NULL,
11 size INTEGER NOT NULL,
12 sha256 TEXT NOT NULL,
13 created_at TEXT NOT NULL
14);
15CREATE INDEX attachments_repo ON attachments(repo_id);