CREATE TABLE hrm_plan_owners (
    ENTERPRISE_ID            NUMBER(18, 0),
    ENABLE_ALERT             VARCHAR2(120),
    PLAN_OWNER_ID            NUMBER(18, 0),
    PLAN_ID                  NUMBER(18, 0)    NOT NULL,
    PERSON_ID                NUMBER(18, 0)    NOT NULL,
    OWNER_TYPE_CODE          VARCHAR2(120)    NOT NULL,
    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),
    LATEST_RECORD_FLAG       VARCHAR2(4)      NOT NULL,
    OPERATION_TYPE           VARCHAR2(840),
    SOURCE_CODE              VARCHAR2(120),
    DATE_FROM                DATE         ,
    DATE_TO                  DATE         ,
    SOURCE_KEY               VARCHAR2(800),
    ENTERPRISE_ID            NUMBER(18, 0),
    PLAN_OWNER_ID            NUMBER(18, 0),
    PLAN_ID                  NUMBER(18, 0)    NOT NULL,
    PERSON_ID                NUMBER(18, 0)    NOT NULL,
    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),
    OWNER_TYPE_CODE          VARCHAR2(120)    NOT NULL,
    ENABLE_ALERT             VARCHAR2(120),
    LATEST_RECORD_FLAG       VARCHAR2(4)      NOT NULL,
    OPERATION_TYPE           VARCHAR2(840),
    SOURCE_CODE              VARCHAR2(120),
    DATE_FROM                DATE         ,
    DATE_TO                  DATE         ,
    SOURCE_KEY               VARCHAR2(800),
    CONSTRAINT pk_hrm_plan_owners PRIMARY KEY (ENTERPRISE_ID, PLAN_OWNER_ID, DATE_FROM, ENTERPRISE_ID, PLAN_OWNER_ID, DATE_FROM)
);
