CREATE TABLE inv_lot_grade_history (
    GRADE_UPDATE_ID          NUMBER(18, 0),
    INVENTORY_ITEM_ID        NUMBER(18, 0),
    ORGANIZATION_ID          NUMBER(18, 0),
    LOT_NUMBER               VARCHAR2(320),
    UPDATE_METHOD            NUMBER(18, 0),
    NEW_GRADE_CODE           VARCHAR2(600),
    OLD_GRADE_CODE           VARCHAR2(600),
    PRIMARY_QUANTITY         NUMBER       ,
    SECONDARY_QUANTITY       NUMBER       ,
    UPDATE_REASON_ID         NUMBER(18, 0),
    INITIAL_GRADE_FLAG       VARCHAR2(600),
    FROM_MOBILE_APPS_FLAG    VARCHAR2(600),
    GRADE_UPDATE_DATE        DATE         ,
    ATTRIBUTE_CATEGORY       VARCHAR2(120),
    ATTRIBUTE1               VARCHAR2(600),
    ATTRIBUTE2               VARCHAR2(600),
    ATTRIBUTE3               VARCHAR2(600),
    ATTRIBUTE4               VARCHAR2(600),
    ATTRIBUTE5               VARCHAR2(600),
    ATTRIBUTE6               VARCHAR2(600),
    ATTRIBUTE7               VARCHAR2(600),
    ATTRIBUTE8               VARCHAR2(600),
    ATTRIBUTE9               VARCHAR2(600),
    ATTRIBUTE10              VARCHAR2(600),
    ATTRIBUTE11              VARCHAR2(600),
    ATTRIBUTE12              VARCHAR2(600),
    ATTRIBUTE13              VARCHAR2(600),
    ATTRIBUTE14              VARCHAR2(600),
    ATTRIBUTE15              VARCHAR2(600),
    CREATED_BY               VARCHAR2(256)    NOT NULL,
    CREATION_DATE            TIMESTAMP(6)     NOT NULL,
    LAST_UPDATED_BY          VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_LOGIN        VARCHAR2(128),
    LAST_UPDATE_DATE         TIMESTAMP(6)     NOT NULL,
    ATTRIBUTE16              VARCHAR2(600),
    ATTRIBUTE17              VARCHAR2(600),
    ATTRIBUTE18              VARCHAR2(600),
    ATTRIBUTE19              VARCHAR2(600),
    ATTRIBUTE20              VARCHAR2(600),
    ATTRIBUTE_NUMBER1        NUMBER       ,
    ATTRIBUTE_NUMBER2        NUMBER       ,
    ATTRIBUTE_NUMBER3        NUMBER       ,
    ATTRIBUTE_NUMBER4        NUMBER       ,
    ATTRIBUTE_NUMBER5        NUMBER       ,
    ATTRIBUTE_NUMBER6        NUMBER       ,
    ATTRIBUTE_NUMBER7        NUMBER       ,
    ATTRIBUTE_NUMBER8        NUMBER       ,
    ATTRIBUTE_NUMBER9        NUMBER       ,
    ATTRIBUTE_NUMBER10       NUMBER       ,
    ATTRIBUTE_DATE1          DATE         ,
    ATTRIBUTE_DATE2          DATE         ,
    ATTRIBUTE_DATE3          DATE         ,
    ATTRIBUTE_DATE4          DATE         ,
    ATTRIBUTE_DATE5          DATE         ,
    ATTRIBUTE_TIMESTAMP1     TIMESTAMP(6) ,
    ATTRIBUTE_TIMESTAMP2     TIMESTAMP(6) ,
    ATTRIBUTE_TIMESTAMP3     TIMESTAMP(6) ,
    ATTRIBUTE_TIMESTAMP4     TIMESTAMP(6) ,
    ATTRIBUTE_TIMESTAMP5     TIMESTAMP(6) ,
    GRADE_UPDATE_ID          NUMBER(18, 0),
    INVENTORY_ITEM_ID        NUMBER(18, 0),
    ORGANIZATION_ID          NUMBER(18, 0),
    LOT_NUMBER               VARCHAR2(320),
    UPDATE_METHOD            NUMBER(18, 0),
    NEW_GRADE_CODE           VARCHAR2(600),
    OLD_GRADE_CODE           VARCHAR2(600),
    PRIMARY_QUANTITY         NUMBER       ,
    SECONDARY_QUANTITY       NUMBER       ,
    UPDATE_REASON_ID         NUMBER(18, 0),
    INITIAL_GRADE_FLAG       VARCHAR2(600),
    FROM_MOBILE_APPS_FLAG    VARCHAR2(600),
    GRADE_UPDATE_DATE        DATE         ,
    ATTRIBUTE_CATEGORY       VARCHAR2(120),
    ATTRIBUTE1               VARCHAR2(600),
    ATTRIBUTE2               VARCHAR2(600),
    ATTRIBUTE3               VARCHAR2(600),
    ATTRIBUTE4               VARCHAR2(600),
    ATTRIBUTE5               VARCHAR2(600),
    ATTRIBUTE6               VARCHAR2(600),
    ATTRIBUTE7               VARCHAR2(600),
    ATTRIBUTE8               VARCHAR2(600),
    ATTRIBUTE9               VARCHAR2(600),
    ATTRIBUTE10              VARCHAR2(600),
    ATTRIBUTE11              VARCHAR2(600),
    ATTRIBUTE12              VARCHAR2(600),
    ATTRIBUTE13              VARCHAR2(600),
    ATTRIBUTE14              VARCHAR2(600),
    ATTRIBUTE15              VARCHAR2(600),
    CREATED_BY               VARCHAR2(256)    NOT NULL,
    CREATION_DATE            TIMESTAMP(6)     NOT NULL,
    LAST_UPDATED_BY          VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_LOGIN        VARCHAR2(128),
    LAST_UPDATE_DATE         TIMESTAMP(6)     NOT NULL,
    ATTRIBUTE16              VARCHAR2(600),
    ATTRIBUTE17              VARCHAR2(600),
    ATTRIBUTE18              VARCHAR2(600),
    ATTRIBUTE19              VARCHAR2(600),
    ATTRIBUTE20              VARCHAR2(600),
    ATTRIBUTE_NUMBER1        NUMBER       ,
    ATTRIBUTE_NUMBER2        NUMBER       ,
    ATTRIBUTE_NUMBER3        NUMBER       ,
    ATTRIBUTE_NUMBER4        NUMBER       ,
    ATTRIBUTE_NUMBER5        NUMBER       ,
    ATTRIBUTE_NUMBER6        NUMBER       ,
    ATTRIBUTE_NUMBER7        NUMBER       ,
    ATTRIBUTE_NUMBER8        NUMBER       ,
    ATTRIBUTE_NUMBER9        NUMBER       ,
    ATTRIBUTE_NUMBER10       NUMBER       ,
    ATTRIBUTE_DATE1          DATE         ,
    ATTRIBUTE_DATE2          DATE         ,
    ATTRIBUTE_DATE3          DATE         ,
    ATTRIBUTE_DATE4          DATE         ,
    ATTRIBUTE_DATE5          DATE         ,
    ATTRIBUTE_TIMESTAMP1     TIMESTAMP(6) ,
    ATTRIBUTE_TIMESTAMP2     TIMESTAMP(6) ,
    ATTRIBUTE_TIMESTAMP3     TIMESTAMP(6) ,
    ATTRIBUTE_TIMESTAMP4     TIMESTAMP(6) ,
    ATTRIBUTE_TIMESTAMP5     TIMESTAMP(6) ,
    CONSTRAINT pk_inv_lot_grade_history PRIMARY KEY (GRADE_UPDATE_ID, GRADE_UPDATE_ID)
);
