-- ABS-67076/ ABS-81088 --

-- ROUTECONTROLBULKPACKING table --
DROP INDEX XAK1ROUTECONTROLBULKPACKING;
CREATE UNIQUE INDEX XAK1ROUTECONTROLBULKPACKING ON ROUTECONTROLBULKPACKING (ROUTECONTROL_ID ASC, NVL(CUSTOMER_LINK_ID,(-1)) ASC, PRODUCT_LINK_ID ASC, SIZEDEFINITION_LINK_ID ASC, FINISHINGMETHOD_ID ASC);

-- ROUTECONTROLEXTRAINFO TABLE --
COMMENT ON COLUMN ROUTECONTROLEXTRAINFO.BULKPACKINGSTATUS
  IS '1 = Not started (default)
2 = In progress
3 = Completed
4 = Complete but Short';

ALTER TABLE ROUTECONTROLEXTRAINFO
  DROP CONSTRAINT BULKPACKINGSTATUS_VALID1;
ALTER TABLE ROUTECONTROLEXTRAINFO
  ADD CONSTRAINT BULKPACKINGSTATUS_VALID1
  CHECK (BULKPACKINGSTATUS IN (1, 2, 3, 4));