CREATE TABLE IF NOT EXISTS repo_branch ( repo UUID NOT NULL, name VARCHAR(255) NOT NULL, oid VARCHAR(255) NOT NULL, upstream VARCHAR(255), head BOOLEAN NOT NULL DEFAULT false, created_at TIMESTAMPTZ NOT NULL, updated_at TIMESTAMPTZ NOT NULL, PRIMARY KEY (repo, name) ); CREATE INDEX idx_repo_branch_repo ON repo_branch (repo);