CREATE TABLE IF NOT EXISTS EVENT_PUBLICATION_ARCHIVE
(
    ID               VARCHAR(36) NOT NULL,
    LISTENER_ID      VARCHAR(512) NOT NULL,
    EVENT_TYPE       VARCHAR(512) NOT NULL,
    SERIALIZED_EVENT VARCHAR(4000) NOT NULL,
    PUBLICATION_DATE TIMESTAMP(6) NOT NULL,
    COMPLETION_DATE  TIMESTAMP(6) DEFAULT NULL NULL,
    PRIMARY KEY (ID),
    INDEX EVENT_PUBLICATION_ARCHIVE_BY_COMPLETION_DATE_IDX (COMPLETION_DATE)
    );
