-- Git LFS: track which content-addressed objects (by sha256 oid) each repo has
-- stored. The bytes live on disk under storage.lfs_dir, sharded by oid prefix.
CREATE TABLE lfs_objects (
    id         TEXT PRIMARY KEY,
    repo_id    TEXT NOT NULL REFERENCES repos(id) ON DELETE CASCADE,
    oid        TEXT NOT NULL,
    size       BIGINT NOT NULL,
    created_at BIGINT NOT NULL
);
CREATE UNIQUE INDEX idx_lfs_objects_repo_oid ON lfs_objects (repo_id, oid);
