-- todo 9689

 /*
      CHANGE REPORT for Table DELIVERYVARIATIONS
          - Adding a new relationship DELVAR_DELIVERYSCHEME_ID
          WARNING : Create FK statement may fail (existing data may violate the new FK rules: adding a new FK DELVAR_DELIVERYSCHEME_ID of table DELIVERYVARIATIONS, which references table DELIVERYSCHEME).
          - Adding column DELIVERYSCHEME_ID
          - Adding index XIF8DELIVERYVARIATIONS
      ACTION is ALTER or modify Table DELIVERYVARIATIONS
      */

ALTER TABLE DELIVERYVARIATIONS ADD (DELIVERYSCHEME_ID    NUMBER NULL);

CREATE INDEX XIF8DELIVERYVARIATIONS ON DELIVERYVARIATIONS
(
       DELIVERYSCHEME_ID              ASC
);


ALTER TABLE DELIVERYVARIATIONS
       ADD  ( CONSTRAINT DELVAR_DELIVERYSCHEME_ID
              FOREIGN KEY (DELIVERYSCHEME_ID)
                             REFERENCES DELIVERYSCHEME 
                             ON DELETE SET NULL) ;

