CREATE TABLE IF NOT EXISTS issue_event (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    issue UUID NOT NULL REFERENCES issue(id),
    actor UUID,
    event TEXT NOT NULL,
    from_value TEXT,
    to_value TEXT,
    metadata TEXT,
    created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
