--ABS-36019
------------ CLEANCOUNTDELIVERY ------------
ALTER TABLE CLEANCOUNTDELIVERY ADD (QUANTITYCOG NUMBER(6) DEFAULT 0 NOT NULL,
                                    CLEANROOMBATCH_ID NUMBER NULL);

CREATE INDEX XIF7CLEANCOUNTDELIVERY ON CLEANCOUNTDELIVERY (CLEANROOMBATCH_ID ASC);

ALTER TABLE CLEANCOUNTDELIVERY
  ADD CONSTRAINT CLEANCOUNTDELIVERY_CRBATCH FOREIGN KEY (CLEANROOMBATCH_ID)
  REFERENCES CLEANROOMBATCH (CLEANROOMBATCH_ID) ON DELETE CASCADE;
  
------------ STERILIZATIONRUN ------------
ALTER TABLE STERILIZATIONRUN ADD (PROGRAMSTARTTIME DATE NULL,
                                  PROGRAMENDTIME DATE NULL,
                                  EXPIRATIONDATE DATE NULL,
                                  F0CYCLE NUMBER NULL,
                                  CLEANROOMBATCH_ID NUMBER NULL);

CREATE INDEX XIF9STERILIZATIONRUN ON STERILIZATIONRUN (CLEANROOMBATCH_ID ASC);

ALTER TABLE STERILIZATIONRUN
  ADD CONSTRAINT STERILIZATIONRUN_CRBATCH FOREIGN KEY (CLEANROOMBATCH_ID)
  REFERENCES CLEANROOMBATCH (CLEANROOMBATCH_ID) ON DELETE CASCADE;
  
------------ STERILIZER ------------
ALTER TABLE STERILIZER ADD CHARGENUMBERCOUNTER NUMBER NULL;
