--- ABS-6175
--------------------   REASONCODEDIALOGS   -----------------------

INSERT INTO REASONCODEDIALOGS
  (REASONCODE_ID, DIALOG_ID, SELECTABLE, SYSTEMUSER_ID, TIMESTAMP)
  SELECT R.REASONCODE_ID,
         D.DIALOG_ID,
         'Y',
         GETMINSYSTEMUSER(),
         GETCURRENTDATETIME()
    FROM REASONCODE R,
         DIALOGS    D WHERE D.CODE IN ('TreatmentBatchControl');

COMMIT;

--------------------   CLEANROOMBATCH   -----------------------
ALTER TABLE CLEANROOMBATCH DROP CONSTRAINT BATCHSTATUS_VALID1_1;

COMMENT ON COLUMN CLEANROOMBATCH.BATCHSTATUS IS '0 = Open 
1 = Closed 
2 = Completed
3 = Rejected';

ALTER TABLE CLEANROOMBATCH ADD CONSTRAINT BATCHSTATUS_VALID1_1 CHECK (BATCHSTATUS BETWEEN 0 AND 3);


