CREATE TABLE gl_calendars (
    CALENDAR_ID                     NUMBER(18, 0)    NOT NULL,
    USER_PERIOD_SET_NAME            VARCHAR2(60)     NOT NULL,
    PERIOD_SET_NAME                 VARCHAR2(60) ,
    PERIOD_SET_ID                   NUMBER(18, 0)    NOT NULL,
    PERIOD_TYPE                     VARCHAR2(60) ,
    PERIOD_TYPE_ID                  NUMBER(18, 0)    NOT NULL,
    DESCRIPTION                     VARCHAR2(960),
    SECURITY_FLAG                   VARCHAR2(4)      NOT NULL,
    NON_ADJ_PERIOD_FREQ_CODE        VARCHAR2(120),
    ADJ_PERIOD_FREQ_CODE            VARCHAR2(120),
    ADJ_PERIODS_NUM                 NUMBER(18, 0),
    LEGACY_RULES_ENABLED_FLAG       VARCHAR2(4)      NOT NULL,
    NON_ADJ_PERIODS_NUM             NUMBER(18, 0)    NOT NULL,
    USER_PERIOD_NAME_PREFIX         VARCHAR2(120),
    PERIOD_NAME_FORMAT_CODE         VARCHAR2(120),
    PERIOD_NAME_SEPARATOR_CODE      VARCHAR2(120),
    LATEST_YEAR_START_DATE          DATE             NOT NULL,
    CALENDAR_START_DATE             DATE             NOT NULL,
    CALENDAR_TYPE_CODE              VARCHAR2(120)    NOT NULL,
    LEGACY_CALENDAR_FLAG            VARCHAR2(4)      NOT NULL,
    ATTRIBUTE1                      VARCHAR2(600),
    ATTRIBUTE2                      VARCHAR2(600),
    ATTRIBUTE3                      VARCHAR2(600),
    ATTRIBUTE4                      VARCHAR2(600),
    ATTRIBUTE5                      VARCHAR2(600),
    ATTRIBUTE_CATEGORY              VARCHAR2(600),
    CREATION_DATE                   TIMESTAMP(6)     NOT NULL,
    CREATED_BY                      VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_DATE                TIMESTAMP(6)     NOT NULL,
    LAST_UPDATE_LOGIN               VARCHAR2(128),
    LAST_UPDATED_BY                 VARCHAR2(256)    NOT NULL,
    OBJECT_VERSION_NUMBER           NUMBER(9, 0)     NOT NULL,
    ENTERPRISE_ID                   NUMBER(18, 0),
    DEFAULT_PARTITION_GROUP_CODE    VARCHAR2(60) ,
    CALENDAR_ID                     NUMBER(18, 0)    NOT NULL,
    USER_PERIOD_SET_NAME            VARCHAR2(60)     NOT NULL,
    PERIOD_SET_NAME                 VARCHAR2(60) ,
    PERIOD_SET_ID                   NUMBER(18, 0)    NOT NULL,
    PERIOD_TYPE                     VARCHAR2(60) ,
    PERIOD_TYPE_ID                  NUMBER(18, 0)    NOT NULL,
    DESCRIPTION                     VARCHAR2(960),
    SECURITY_FLAG                   VARCHAR2(4)      NOT NULL,
    NON_ADJ_PERIOD_FREQ_CODE        VARCHAR2(120),
    ADJ_PERIOD_FREQ_CODE            VARCHAR2(120),
    ADJ_PERIODS_NUM                 NUMBER(18, 0),
    LEGACY_RULES_ENABLED_FLAG       VARCHAR2(4)      NOT NULL,
    NON_ADJ_PERIODS_NUM             NUMBER(18, 0)    NOT NULL,
    USER_PERIOD_NAME_PREFIX         VARCHAR2(120),
    PERIOD_NAME_FORMAT_CODE         VARCHAR2(120),
    PERIOD_NAME_SEPARATOR_CODE      VARCHAR2(120),
    LATEST_YEAR_START_DATE          DATE             NOT NULL,
    CALENDAR_START_DATE             DATE             NOT NULL,
    CALENDAR_TYPE_CODE              VARCHAR2(120)    NOT NULL,
    LEGACY_CALENDAR_FLAG            VARCHAR2(4)      NOT NULL,
    ATTRIBUTE1                      VARCHAR2(600),
    ATTRIBUTE2                      VARCHAR2(600),
    ATTRIBUTE3                      VARCHAR2(600),
    ATTRIBUTE4                      VARCHAR2(600),
    ATTRIBUTE5                      VARCHAR2(600),
    ATTRIBUTE_CATEGORY              VARCHAR2(600),
    CREATION_DATE                   TIMESTAMP(6)     NOT NULL,
    CREATED_BY                      VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_DATE                TIMESTAMP(6)     NOT NULL,
    LAST_UPDATE_LOGIN               VARCHAR2(128),
    LAST_UPDATED_BY                 VARCHAR2(256)    NOT NULL,
    OBJECT_VERSION_NUMBER           NUMBER(9, 0)     NOT NULL,
    ENTERPRISE_ID                   NUMBER(18, 0),
    DEFAULT_PARTITION_GROUP_CODE    VARCHAR2(60) ,
    CONSTRAINT pk_gl_calendars PRIMARY KEY (PERIOD_SET_NAME, PERIOD_TYPE, PERIOD_SET_NAME, PERIOD_TYPE)
);
