CREATE TABLE IF NOT EXISTS repo_fork (
    id BIGSERIAL PRIMARY KEY,
    parent_repo UUID NOT NULL,
    forked_repo UUID NOT NULL,
    forked_by UUID NOT NULL,
    forked_at TIMESTAMPTZ NOT NULL
);

CREATE INDEX idx_repo_fork_parent_repo ON repo_fork (parent_repo);
CREATE UNIQUE INDEX idx_repo_fork_forked_repo ON repo_fork (forked_repo);
