OXYGENHUB
# 27322cd2755a oxygenhub / crates / hub / migrations / 0021_flow_receipts.sql
688 B · SQL · last changed Verify and keep signed Flow receipts 1 month ago source blame history raw
1
-- Signed receipts (Oxygen spec §14.6): the receipt attestation a job's
2
-- receipt is kept in the repository as, the runner that signed it, and why a
3
-- signed receipt was not kept.
4
ALTER TABLE flow_jobs ADD COLUMN receipt_attest TEXT NOT NULL DEFAULT '';
5
ALTER TABLE flow_jobs ADD COLUMN receipt_signer TEXT NOT NULL DEFAULT '';
6
ALTER TABLE flow_jobs ADD COLUMN receipt_note TEXT NOT NULL DEFAULT '';
7
-- The key each runner token signs with, learned from its first signed
8
-- receipt; later receipts under that token must carry the same key.
9
CREATE TABLE flow_runner_keys (
10
    token_hash TEXT PRIMARY KEY,
11
    key TEXT NOT NULL,
12
    name TEXT NOT NULL,
13
    first_ms INTEGER NOT NULL
14
);