-- ABS-29914

-----------------------WEARERTEMPASSIGNMENT -----------------------

ALTER TABLE WEARERTEMPASSIGNMENT DROP COLUMN WEARERINVENTORY_ID CASCADE CONSTRAINTS;
ALTER TABLE WEARERTEMPASSIGNMENT ADD (WEAREREMPLOYMENT_ID NUMBER NOT NULL);
DROP INDEX XIE1WEARERTEMPASSIGNMENT;

DROP INDEX XIF2WEARERTEMPASSIGNMENT;

CREATE INDEX XIE1WEARERTEMPASSIGNMENT  ON                                      
WEARERTEMPASSIGNMENT(DISTRIBUTIONPOINT_ID ASC, WEAREREMPLOYMENT_ID ASC);

CREATE INDEX XIF2WEARERTEMPASSIGNMENT ON WEARERTEMPASSIGNMENT (WEAREREMPLOYMENT_ID ASC);

ALTER TABLE WEARERTEMPASSIGNMENT
  ADD CONSTRAINT WEARERTEMPASSIGNMENT_WEAREREMP FOREIGN KEY (WEAREREMPLOYMENT_ID)  
  REFERENCES WEAREREMPLOYMENT (WEAREREMPLOYMENT_ID);

