      
      /*
      CHANGE REPORT for Table WORKORDER
          - Adding a new relationship WORKORDER_DIALOG_ID
          WARNING : Create FK statement may fail (existing data may violate the new FK rules: adding a new FK WORKORDER_DIALOG_ID of table WORKORDER, which references table DIALOGS).
          - Adding column DIALOG_ID
          - Adding index XIF12WORKORDER
      ACTION is ALTER or modify Table WORKORDER
      */

ALTER TABLE WORKORDER ADD (DIALOG_ID            NUMBER  NULL);

CREATE INDEX XIF12WORKORDER ON WORKORDER
(
       DIALOG_ID                      ASC
);


ALTER TABLE WORKORDER
       ADD  ( CONSTRAINT WORKORDER_DIALOG_ID
              FOREIGN KEY (DIALOG_ID)
                             REFERENCES DIALOGS ) ;

