OXYGENHUB
# 20b8fe85888b oxygenhub / crates / hub / migrations / 0022_flow_artifacts.sql
561 B · SQL · last changed Keep and serve Flow job artifacts 1 month ago source blame history raw
1
-- A job's artifacts (OxygenFlow spec §5.2): each kept as a blob of the
2
-- run's repository, with its size and the BLAKE3 of its bytes, which is
3
-- how a release asset finds the receipt that built it.
4
CREATE TABLE flow_artifacts (
5
    job_id INTEGER NOT NULL REFERENCES flow_jobs(id) ON DELETE CASCADE,
6
    name TEXT NOT NULL,
7
    path TEXT NOT NULL,
8
    blob TEXT NOT NULL,
9
    size INTEGER NOT NULL,
10
    content TEXT NOT NULL,
11
    created_ms INTEGER NOT NULL,
12
    PRIMARY KEY (job_id, name)
13
);
14
CREATE INDEX flow_artifacts_content ON flow_artifacts(content);