CREATE TABLE IF NOT EXISTS pull_request_review (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    pull_request UUID NOT NULL REFERENCES pull_request(id),
    reviewer UUID NOT NULL,
    state TEXT NOT NULL,
    body TEXT,
    commit_sha TEXT,
    submitted_at TIMESTAMPTZ,
    created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
    updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
    dismissed_by UUID,
    dismissed_at TIMESTAMPTZ,
    dismiss_reason TEXT
);
