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

    area_id text NOT NULL,
    area_coords text NOT NULL,
    area_tags text,
    area_title text,
    area_index INTEGER DEFAULT 0,
    area_type TEXT,
    area_tooltip TEXT,
    revision BIGINT,
    area_details JSON,

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