CREATE TABLE promo_codes_meta_history (
    history_event_id BIGSERIAL PRIMARY KEY,
    history_user_id text NOT NULL,
    history_originator_id text,
    history_action text NOT NULL,
    history_timestamp integer NOT NULL,
    history_comment text,

    id uuid NOT NULL,
    code text NOT NULL,
    usage_limit INTEGER NOT NULL,
    activity_start BIGINT NOT NULL,
    activity_deadline BIGINT NOT NULL,
    removing_deadline BIGINT NOT NULL,
    type BIGINT NOT NULL,
    prefix text NOT NULL,
    given_out TEXT,
    meta JSON
);
