Files
GitHop/services/control-plane/internal/store/migrations/001_foundation.sql
T
Hop d9544b435b Add the runnable Gitea, PostgreSQL, and Hop control-plane foundation
Hop-State: A_06FN3QYA1N56NQYGZ81DWGR
Hop-Proposal: R_06FN3QXJRYPPEQZQA6S69QG
Hop-Task: T_06FN3MVGY3MT82ESQ89BND0
Hop-Attempt: AT_06FN3MVGY092BFA5MR9C7EG
2026-07-11 08:50:48 -07:00

22 lines
628 B
SQL

CREATE TABLE repositories (
id text PRIMARY KEY,
gitea_id bigint NOT NULL UNIQUE CHECK (gitea_id > 0),
owner text NOT NULL,
name text NOT NULL,
full_name text NOT NULL,
clone_url text NOT NULL DEFAULT '',
default_branch text NOT NULL DEFAULT '',
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
UNIQUE (owner, name)
);
CREATE TABLE webhook_deliveries (
delivery_id text PRIMARY KEY,
event text NOT NULL,
event_type text NOT NULL DEFAULT '',
payload_sha256 text NOT NULL,
received_at timestamptz NOT NULL DEFAULT now()
);