CREATE TABLE ffs_qts_bucket_profile (
    BUCKET_ID                         NUMBER(8, 0) ,
    QUOTA_FLAGS                       NUMBER(5, 0)     NOT NULL,
    CLOSE_QUOTA_FLAGS                 NUMBER(5, 0)     NOT NULL,
    MAX_CAPACITY_FLAGS                NUMBER(5, 0)     NOT NULL,
    AVAILABLE_CAPACITY_FLAGS          NUMBER(5, 0)     NOT NULL,
    DAY_QUOTA_FLAGS                   NUMBER(5, 0)     NOT NULL,
    TIME_SLOT_QUOTA_FLAGS             NUMBER(5, 0)     NOT NULL,
    CATEGORY_QUOTA_FLAGS              NUMBER(5, 0)     NOT NULL,
    HISTORICAL_DATA_PERIOD            VARCHAR2(40) ,
    SWITCH_TO_PLANS_DAYS              NUMBER(5, 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),
    START_THRESHOLD                   NUMBER(2, 0)     NOT NULL,
    BOOKING_WITH_FORECAST_MIN_DAYS    NUMBER(3, 0)     NOT NULL,
    BOOKING_WITH_FORECAST_MAX_DAYS    NUMBER(3, 0)     NOT NULL,
    BUCKET_ID                         NUMBER(8, 0) ,
    QUOTA_FLAGS                       NUMBER(5, 0)     NOT NULL,
    CLOSE_QUOTA_FLAGS                 NUMBER(5, 0)     NOT NULL,
    MAX_CAPACITY_FLAGS                NUMBER(5, 0)     NOT NULL,
    AVAILABLE_CAPACITY_FLAGS          NUMBER(5, 0)     NOT NULL,
    DAY_QUOTA_FLAGS                   NUMBER(5, 0)     NOT NULL,
    TIME_SLOT_QUOTA_FLAGS             NUMBER(5, 0)     NOT NULL,
    CATEGORY_QUOTA_FLAGS              NUMBER(5, 0)     NOT NULL,
    HISTORICAL_DATA_PERIOD            VARCHAR2(40) ,
    SWITCH_TO_PLANS_DAYS              NUMBER(5, 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),
    START_THRESHOLD                   NUMBER(2, 0)     NOT NULL,
    BOOKING_WITH_FORECAST_MIN_DAYS    NUMBER(3, 0)     NOT NULL,
    BOOKING_WITH_FORECAST_MAX_DAYS    NUMBER(3, 0)     NOT NULL,
    CONSTRAINT pk_ffs_qts_bucket_profile PRIMARY KEY (BUCKET_ID, BUCKET_ID)
);
