-- ABS-147630 Unique Item Loss Charge Tracking / ABS-154160

ALTER TABLE OUTOFCIRCULATIONHISTORY 
ADD (LOSSCHARGEINVOICELINE_ID NUMBER NULL);

CREATE INDEX XIF16OUTOFCIRCULATIONHISTORY ON OUTOFCIRCULATIONHISTORY (LOSSCHARGEINVOICELINE_ID);

ALTER TABLE OUTOFCIRCULATIONHISTORY
ADD CONSTRAINT FK_OUTOFCIRCULATIONHISTORY_LOSSCHARGEINVOICELINEID FOREIGN KEY (LOSSCHARGEINVOICELINE_ID) REFERENCES INVOICELINE (INVOICELINE_ID) ON DELETE SET NULL;