CREATE TABLE user_roles_history (
    history_event_id SERIAL PRIMARY KEY,
    history_user_id uuid NOT NULL,
    history_originator_id text,
    history_action text NOT NULL,
    history_timestamp integer NOT NULL,
    history_comment text,

    role_id text NOT NULL,
    user_id uuid NOT NULL,
    deadline bigint,
    active boolean DEFAULT true,
    forced boolean,
    data text,

    FOREIGN KEY(history_user_id) REFERENCES "user"(id),
    FOREIGN KEY(user_id) REFERENCES "user"(id)
);
