gitdataai/libs/migrate/sql/m20250628_000032_create_repo_commit.sql
2026-04-15 09:08:09 +08:00

18 lines
530 B
SQL

CREATE TABLE IF NOT EXISTS repo_commit (
id BIGSERIAL PRIMARY KEY,
repo UUID NOT NULL,
oid VARCHAR(255) NOT NULL,
author_name VARCHAR(255) NOT NULL,
author_email VARCHAR(255) NOT NULL,
author UUID,
commiter_name VARCHAR(255) NOT NULL,
commiter_email VARCHAR(255) NOT NULL,
commiter UUID,
message TEXT NOT NULL,
parent JSONB NOT NULL,
created_at TIMESTAMPTZ NOT NULL
);
CREATE INDEX idx_repo_commit_repo ON repo_commit (repo);
CREATE INDEX idx_repo_commit_oid ON repo_commit (oid);