-- Tombstones of photos removed from sequences (owner review 2, R6): a photo deleted into the archive's trash (reason 0) -- or replaced by a converted file (reason 1, with the replacement's SHA-256). The sidecar's "removed" list is the truth; -- the index writes these rows from it, so a rebuild keeps them. Sync never offers a tombstoned photo back, and an upload -- of that content into the sequence is answered as already there. Mirrors postgres/0008_frame_removals.sql. CREATE TABLE frame_removals ( sequence_id TEXT NOT NULL REFERENCES sequences (id) ON DELETE CASCADE, sha256 TEXT NOT NULL, replacement_sha256 TEXT, reason INTEGER NOT NULL DEFAULT 0, removed_at TEXT NOT NULL, PRIMARY KEY (sequence_id, sha256) ); CREATE INDEX ix_frame_removals_sha256 ON frame_removals (sha256);