OXYGENHUB
# c2efc0b4674d oxygenhub / crates / hub / migrations / 0076_tlog_entries.sql
640 B · SQL · last changed The hub's transparency log (step 1 of docs/transparency.md) 18 days ago source blame history raw
1
-- The transparency log's index (oxygenhub#238, docs/transparency.md):
2
-- which entry logged which object, so a proof can be given for it and an
3
-- object is logged once. The log itself is append-only files in the data
4
-- directory (tlog/); these rows only point into it.
5
CREATE TABLE tlog_entries (
6
    idx         INTEGER PRIMARY KEY,
7
    object      TEXT NOT NULL,
8
    kind        TEXT NOT NULL,
9
    repo_id     INTEGER REFERENCES repositories(id) ON DELETE SET NULL,
10
    received_ms INTEGER NOT NULL
11
);
12
CREATE UNIQUE INDEX tlog_entries_object ON tlog_entries(object, kind);
13
CREATE INDEX tlog_entries_repo ON tlog_entries(repo_id, idx);