--- ABS-16905
---------------------------   MULTIREADEXCEPTIONREASON   ------------------------------
INSERT INTO MULTIREADEXCEPTIONREASON (MULTIREADEXCEPTIONREASON_ID, FACTORYDESCRIPTION, STORELOGYN, SYSTEMUSER_ID, TIMESTAMP)
VALUES (17, 'Container ID not found in database', 'Y', GETMINSYSTEMUSER(), SYSDATE);
COMMIT;

INSERT INTO MULTIREADEXCEPTIONREASON (MULTIREADEXCEPTIONREASON_ID, FACTORYDESCRIPTION, STORELOGYN, SYSTEMUSER_ID, TIMESTAMP)
VALUES (18, 'Container inactive', 'Y', GETMINSYSTEMUSER(), SYSDATE);
COMMIT;

INSERT INTO MULTIREADEXCEPTIONREASON (MULTIREADEXCEPTIONREASON_ID, FACTORYDESCRIPTION, STORELOGYN, SYSTEMUSER_ID, TIMESTAMP)
VALUES (19, 'Container is for a different customer', 'Y', GETMINSYSTEMUSER(), SYSDATE);
COMMIT;

INSERT INTO MULTIREADEXCEPTIONREASON (MULTIREADEXCEPTIONREASON_ID, FACTORYDESCRIPTION, STORELOGYN, SYSTEMUSER_ID, TIMESTAMP)
VALUES (20, 'Container already scanned at this note', 'Y', GETMINSYSTEMUSER(), SYSDATE);
COMMIT;

---------------------------    MULTIREADSCANBATCHCONTKNT  ------------------------------
CREATE TABLE MULTIREADSCANBATCHCONTKNT
(
MULTIREADSCANBATCH_ID NUMBER NOT NULL,
SUBBATCHNUMBER NUMBER NOT NULL,
IDCODE VARCHAR2(24) NOT NULL,
CONTAINER_ID NUMBER NULL,
MULTIREADEXCEPTION_ID NUMBER NULL,
SCANTIMESTAMP DATE NOT NULL,
SYSTEMUSER_ID NUMBER NOT NULL,
DISTRIBUTIONPOINT_ID NUMBER  NULL,
LASTDISTRIBPOINT_ID NUMBER NULL,
BUSINESSUNIT_ID NUMBER NULL,
OWNERBUSINESSUNIT_ID NUMBER NULL,
OWNERCUSTOMER_ID NUMBER NULL,
CONTAINERTYPE_ID NUMBER NULL,
STAY_ID NUMBER NULL,
TAREWEIGHT NUMBER(15,6) NULL,
CONTAINERSCAN_ID NUMBER NULL,
SECONDARYID VARCHAR2(24) NULL
);

ALTER TABLE MULTIREADSCANBATCHCONTKNT ADD CONSTRAINT XPKMULTIREADSCANBATCHCONTKNT PRIMARY KEY(MULTIREADSCANBATCH_ID, IDCODE);

CREATE INDEX XIE1MULTIREADSCANBATCHCONTKNT ON MULTIREADSCANBATCHCONTKNT(MULTIREADSCANBATCH_ID ASC, SUBBATCHNUMBER ASC, IDCODE ASC);

CREATE INDEX XIE2MULTIREADSCANBATCHCONTKNT ON MULTIREADSCANBATCHCONTKNT(MULTIREADSCANBATCH_ID ASC, SUBBATCHNUMBER ASC, CONTAINER_ID ASC);

CREATE INDEX XIF1MULTIREADSCANBATCHCONTKNT ON MULTIREADSCANBATCHCONTKNT(MULTIREADSCANBATCH_ID ASC);

ALTER TABLE MULTIREADSCANBATCHCONTKNT ADD CONSTRAINT MULTIREADSCANBATCHCONTKNT_MRID FOREIGN KEY(MULTIREADSCANBATCH_ID) 
REFERENCES MULTIREADSCANBATCH(MULTIREADSCANBATCH_ID) ON DELETE CASCADE;


---------------------------    UHFTAGFILTER  ------------------------------
ALTER TABLE UHFTAGFILTER ADD(CONTAINERTAG VARCHAR2(1) DEFAULT 'N' NOT NULL
			     CONSTRAINT YN_VALIDATIONFIELD268 CHECK (CONTAINERTAG IN ('Y','N')));

---------------------------    UHFANTENNAMODEL  ------------------------------
INSERT INTO UHFANTENNAMODEL(UHFANTENNAMODEL_ID, NAME, GAIN, SYSTEMUSER_ID, TIMESTAMP)
VALUES (24, 'Times-7 SlimLine A6031', 4, GETMINSYSTEMUSER(), SYSDATE);
COMMIT;


