CREATE TABLE insurance_tasks_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,
    notification_id integer NOT NULL,
    user_id uuid NOT NULL,
    object_id uuid NOT NULL,
    session_id text DEFAULT '',
    start int NOT NULL,
    finish int NOT NULL,

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