OXYGENHUB
# 8dcaeeb848c6 oxygenhub / crates / hub / migrations / 0069_diffusion_indexed.sql
503 B · SQL · last changed Diffusion reconciler: every 10 minutes the pin index is checked and mended 20 days ago source blame history raw
1
-- The state each followed bookmark's pins were indexed at (oxygenhub#210):
2
-- the reconciler compares it with the bookmark as it is and re-indexes
3
-- where they differ, so an index write that failed is mended within
4
-- minutes rather than at the next restart.
5
CREATE TABLE diffusion_indexed (
6
    consumer_id INTEGER NOT NULL REFERENCES repositories(id) ON DELETE CASCADE,
7
    bookmark TEXT NOT NULL,
8
    heads TEXT NOT NULL,
9
    updated_ms INTEGER NOT NULL,
10
    PRIMARY KEY (consumer_id, bookmark)
11
);