CREATE TABLE user_documents_checks_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,

    user_id uuid NOT NULL,
    type text NOT NULL,
    status text,
    meta json,

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