OXYGENHUB
# addec2bd6423 oxygenhub / crates / hub / migrations / 0051_jet_images.sql
604 B · SQL · last changed Images by hash on the hub: chunks, verified manifests, and placement for runners that fetch 25 days ago source blame history raw
1
-- Images by hash (oxygenflow#39, Jetstream): rootfs images this hub keeps
2
-- for runners to fetch, as chunks under <data>/images and a manifest each.
3
CREATE TABLE jet_images (
4
    hash        TEXT PRIMARY KEY,
5
    size        INTEGER NOT NULL,
6
    arch        TEXT NOT NULL,
7
    chunks      INTEGER NOT NULL,
8
    uploader    TEXT NOT NULL,
9
    created_ms  INTEGER NOT NULL
10
);
11
12
-- Whether a runner fetches a job's image it lacks from the hub, as its
13
-- claims say; the placement pass counts the hub's images as its own then.
14
ALTER TABLE flow_runners ADD COLUMN fetches_images INTEGER NOT NULL DEFAULT 0;