CREATE TABLE cmp_cwb_audit (
    AUDIT_ID                    NUMBER(18, 0),
    BUSINESS_GROUP_ID           NUMBER(18, 0)    NOT NULL,
    PERSON_EVENT_ID             NUMBER(18, 0)    NOT NULL,
    PLAN_ID                     NUMBER(18, 0)    NOT NULL,
    PERIOD_ID                   NUMBER(18, 0)    NOT NULL,
    COMPONENT_ID                NUMBER(18, 0),
    POOL_ID                     NUMBER(18, 0),
    ATTRIBUTE_NAME              VARCHAR2(120)    NOT NULL,
    OLD_VAL_VARCHAR             VARCHAR2(800),
    NEW_VAL_VARCHAR             VARCHAR2(800),
    OLD_VAL_NUMBER              NUMBER       ,
    NEW_VAL_NUMBER              NUMBER       ,
    OLD_VAL_DATE                DATE         ,
    NEW_VAL_DATE                DATE         ,
    SUPPORTING_INFORMATION      VARCHAR2(800),
    AUDIT_DATE                  TIMESTAMP(6) ,
    CHANGE_MADE_BY_PERSON_ID    NUMBER(18, 0),
    OBJECT_VERSION_NUMBER       NUMBER(9, 0)     NOT NULL,
    CREATED_BY                  VARCHAR2(256)    NOT NULL,
    CREATION_DATE               TIMESTAMP(6)     NOT NULL,
    LAST_UPDATED_BY             VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_DATE            TIMESTAMP(6)     NOT NULL,
    LAST_UPDATE_LOGIN           VARCHAR2(128),
    EXTERNAL_WORKER_DATA_ID     NUMBER(18, 0),
    AUDIT_ID                    NUMBER(18, 0),
    BUSINESS_GROUP_ID           NUMBER(18, 0)    NOT NULL,
    PERSON_EVENT_ID             NUMBER(18, 0)    NOT NULL,
    PLAN_ID                     NUMBER(18, 0)    NOT NULL,
    PERIOD_ID                   NUMBER(18, 0)    NOT NULL,
    COMPONENT_ID                NUMBER(18, 0),
    POOL_ID                     NUMBER(18, 0),
    ATTRIBUTE_NAME              VARCHAR2(120)    NOT NULL,
    OLD_VAL_VARCHAR             VARCHAR2(800),
    NEW_VAL_VARCHAR             VARCHAR2(800),
    OLD_VAL_NUMBER              NUMBER       ,
    NEW_VAL_NUMBER              NUMBER       ,
    OLD_VAL_DATE                DATE         ,
    NEW_VAL_DATE                DATE         ,
    SUPPORTING_INFORMATION      VARCHAR2(800),
    AUDIT_DATE                  TIMESTAMP(6) ,
    CHANGE_MADE_BY_PERSON_ID    NUMBER(18, 0),
    OBJECT_VERSION_NUMBER       NUMBER(9, 0)     NOT NULL,
    CREATED_BY                  VARCHAR2(256)    NOT NULL,
    CREATION_DATE               TIMESTAMP(6)     NOT NULL,
    LAST_UPDATED_BY             VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_DATE            TIMESTAMP(6)     NOT NULL,
    LAST_UPDATE_LOGIN           VARCHAR2(128),
    EXTERNAL_WORKER_DATA_ID     NUMBER(18, 0),
    CONSTRAINT pk_cmp_cwb_audit PRIMARY KEY (AUDIT_ID, AUDIT_ID)
);
