gitdataai/libs/migrate/sql/m20250628_000029_create_repo_branch.sql
2026-04-14 19:02:01 +08:00

13 lines
360 B
SQL

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);