 --order 502750
      /*
      ACTION is CREATE Table CPLTRANSITION
      */

CREATE TABLE CPLTRANSITION (
       OLDSTANDARDDELIVERYLINE_ID NUMBER NOT NULL,
       NEWSTANDARDDELIVERYLINE_ID NUMBER NOT NULL,
       SYSTEMUSER_ID        NUMBER NOT NULL,
       TIMESTAMP            DATE NOT NULL
);

CREATE SEQUENCE SEQ_CPLTRANSITION
START WITH 1
INCREMENT BY 1;
 
CREATE UNIQUE INDEX XPKCPLTRANSITION ON CPLTRANSITION
(
       OLDSTANDARDDELIVERYLINE_ID     ASC,
       NEWSTANDARDDELIVERYLINE_ID     ASC
);

ALTER TABLE CPLTRANSITION
       ADD  ( CONSTRAINT XPKCPLTRANSITION PRIMARY KEY(OLDSTANDARDDELIVERYLINE_ID, 
              NEWSTANDARDDELIVERYLINE_ID) ) ;


CREATE INDEX XIF1CPLTRANSITION ON CPLTRANSITION
(
       OLDSTANDARDDELIVERYLINE_ID     ASC
);

CREATE INDEX XIF2CPLTRANSITION ON CPLTRANSITION
(
       NEWSTANDARDDELIVERYLINE_ID     ASC
);


ALTER TABLE CPLTRANSITION
       ADD  ( CONSTRAINT CPLTRANSITION_NEWSTANDARDDELIV
              FOREIGN KEY (NEWSTANDARDDELIVERYLINE_ID)
                             REFERENCES STANDARDDELIVERYLINE
                             ON DELETE CASCADE ) ;


ALTER TABLE CPLTRANSITION
       ADD  ( CONSTRAINT CPLTRANSITION_OLDSTANDARDDELIV
              FOREIGN KEY (OLDSTANDARDDELIVERYLINE_ID)
                             REFERENCES STANDARDDELIVERYLINE
                             ON DELETE CASCADE ) ;

--order 502752
/*
      CHANGE REPORT for Table PACKINGNOTE
          - Adding column NUMBEROFCOLLI
      ACTION is ALTER or modify Table PACKINGNOTE
      */

ALTER TABLE PACKINGNOTE ADD (NUMBEROFCOLLI        NUMBER(5) DEFAULT 1 NOT NULL)
    ;
