--ABSN-10328

--MULTIREADSCANBATCH TABLE
ALTER TABLE MULTIREADSCANBATCH ADD (UNIQUEBUNDLE_ID NUMBER NULL);

--MULTIREADSCANBATCHCONTENTS TABLE
ALTER TABLE MULTIREADSCANBATCHCONTENTS ADD (BUNDLEQUANTITY NUMBER NULL);

--RAGREASON TABLE
ALTER TABLE RAGREASON ADD (AUTORAG VARCHAR2(1) DEFAULT 'N' NOT NULL CONSTRAINT CHK_RAGREASON_AUTORAG CHECK (AUTORAG IN ('Y','N')));
COMMENT ON COLUMN RAGREASON.AUTORAG IS 'Mark the ragReason that will be used in AutoRag processed';

--REASONCODE
ALTER TABLE REASONCODE ADD (AUTOISSUE VARCHAR2(1) DEFAULT 'N' NOT NULL CONSTRAINT CHK_REASONCODE_AUTOISSUE CHECK (AUTOISSUE IN ('Y','N')));

--OUTOFCIRCULATIONHISTORY
ALTER TABLE OUTOFCIRCULATIONHISTORY DROP CONSTRAINT CHK_OUTOFCIRCULATIONHISTORY_ORIGIN;
ALTER TABLE OUTOFCIRCULATIONHISTORY ADD CONSTRAINT CHK_OUTOFCIRCULATIONHISTORY_ORIGIN CHECK (ORIGIN IN (0,1,2,3,4,5,6,7,8,9,10,11));

COMMENT ON COLUMN OUTOFCIRCULATIONHISTORY.ORIGIN IS '0= Not defined - default 1= Return to stock / rag (Take items out of circ dialog) 2= Return to stock / rag in batch 3= Settlement 4= Route Returns 5= PL/SQL Return Unique Item To Stock 6= RouteAssistant Upload 7= PL/SQL MultiRead.RagScanInBatch 8= Process Rag after grace period 9= Garment Dispense 10=Cancelled loss recharge in loss charge monitor 11 = Bundle Assembly Multiread';
