CREATE TABLE msc_api_wd_comp_substitutes (
    SUB_MATERIAL_ID                NUMBER(18, 0)    NOT NULL,
    WD_OPERATION_MATERIAL_ID       NUMBER(18, 0),
    SUB_COMPONENT_ID               NUMBER(18, 0),
    SUB_COMPONENT_SEQUENCE_ID      NUMBER(18, 0)    NOT NULL,
    SUBSTITUTE_ITEM_QUANTITY       NUMBER           NOT NULL,
    SUBSTITUTE_INVERSE_QUANTITY    NUMBER       ,
    PRIORITY_RANKING               NUMBER       ,
    CONFIG_ITEM_ID                 NUMBER       ,
    ORGANIZATION_ID                NUMBER       ,
    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),
    SUB_MATERIAL_ID                NUMBER(18, 0)    NOT NULL,
    WD_OPERATION_MATERIAL_ID       NUMBER(18, 0),
    SUB_COMPONENT_ID               NUMBER(18, 0),
    SUB_COMPONENT_SEQUENCE_ID      NUMBER(18, 0)    NOT NULL,
    SUBSTITUTE_ITEM_QUANTITY       NUMBER           NOT NULL,
    SUBSTITUTE_INVERSE_QUANTITY    NUMBER       ,
    PRIORITY_RANKING               NUMBER       ,
    CONFIG_ITEM_ID                 NUMBER       ,
    ORGANIZATION_ID                NUMBER       ,
    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_msc_api_wd_comp_substitutes PRIMARY KEY (WD_OPERATION_MATERIAL_ID, SUB_COMPONENT_ID, CONFIG_ITEM_ID, ORGANIZATION_ID, WD_OPERATION_MATERIAL_ID, SUB_COMPONENT_ID, CONFIG_ITEM_ID, ORGANIZATION_ID)
);
