CREATE TABLE cmp_plan_access (
    PLAN_ACCESS_ID           NUMBER(18, 0),
    BUSINESS_GROUP_ID        NUMBER(18, 0)    NOT NULL,
    ROLE_TYPE                VARCHAR2(4)  ,
    COMP_TYPE                VARCHAR2(120),
    ACTION_ID                NUMBER(18, 0),
    ACTION_TYPE_ID           NUMBER(18, 0),
    ROLE_GUID                VARCHAR2(256),
    PLAN_ID                  NUMBER(18, 0)    NOT NULL,
    CUSTOM_ID                NUMBER(18, 0),
    ACCESS_CODE              VARCHAR2(120),
    INSERT_ACCESS_CODE       VARCHAR2(120),
    UPDATE_ACCESS_CODE       VARCHAR2(120),
    EXIT_ACCESS_CODE         VARCHAR2(120),
    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),
    PLAN_ACCESS_ID           NUMBER(18, 0),
    BUSINESS_GROUP_ID        NUMBER(18, 0)    NOT NULL,
    ROLE_TYPE                VARCHAR2(4)  ,
    COMP_TYPE                VARCHAR2(120),
    ACTION_ID                NUMBER(18, 0),
    ACTION_TYPE_ID           NUMBER(18, 0),
    ROLE_GUID                VARCHAR2(256),
    PLAN_ID                  NUMBER(18, 0)    NOT NULL,
    CUSTOM_ID                NUMBER(18, 0),
    ACCESS_CODE              VARCHAR2(120),
    INSERT_ACCESS_CODE       VARCHAR2(120),
    UPDATE_ACCESS_CODE       VARCHAR2(120),
    EXIT_ACCESS_CODE         VARCHAR2(120),
    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),
    CONSTRAINT pk_cmp_plan_access PRIMARY KEY (PLAN_ACCESS_ID, PLAN_ACCESS_ID)
);
