CREATE TABLE IF NOT EXISTS repo_hook (
    id BIGSERIAL PRIMARY KEY,
    repo_uuid UUID NOT NULL,
    event JSONB NOT NULL,
    script TEXT NOT NULL,
    created_at TIMESTAMPTZ NOT NULL
);

CREATE INDEX idx_repo_hook_repo ON repo_hook (repo_uuid);
