-- ABS-46334
----------   INTERNETORDERLINE   --------------
ALTER TABLE INTERNETORDERLINE ADD (SECONDARYDELIVERYVAR_ID NUMBER NULL);

COMMENT ON COLUMN INTERNETORDERLINE.SECONDARYDELIVERYVAR_ID IS 'Used if a large delivery variation is generated from a stock count difference and it needs to be split over 2 days.';

CREATE INDEX XIF8INTERNETORDERLINE ON INTERNETORDERLINE (SECONDARYDELIVERYVAR_ID ASC);

ALTER TABLE INTERNETORDERLINE ADD CONSTRAINT INTERNETORDERLINE_SECDVID FOREIGN KEY (SECONDARYDELIVERYVAR_ID)
REFERENCES DELIVERYVARIATIONS (DELIVERYVARIATIONS_ID) ON DELETE SET NULL;



