-- ABS-9533 / ABS-83799

------------- PACKINGNOTE --------
ALTER TABLE PACKINGNOTE ADD (TRUCKLOADTIMESTAMP DATE NULL,
                             TRUCKLOADEDBY NUMBER NULL);

------------ ROUTECONTROLEXTRAINFO ----------
ALTER TABLE ROUTECONTROLEXTRAINFO ADD (TRUCKLOADSTATUS NUMBER DEFAULT 1 NOT NULL
                                       CONSTRAINT CHK_RCEXTRAINFO_TRUCKLOADSTAT CHECK(TRUCKLOADSTATUS IN(1,2,3)),
                                       TRUCKLOADSTARTTIMESTAMP DATE NULL,
                                       TRUCKLOADENDTIMESTAMP DATE NULL,
                                       TRUCKLOADEDSYSTEMUSER_ID NUMBER NULL);
COMMENT ON COLUMN ROUTECONTROLEXTRAINFO.TRUCKLOADSTATUS
IS'1 = Not started (default)
2 = In progress
3 = Completed';
                                       
---------- CONTAINERSCAN -----------
ALTER TABLE CONTAINERSCAN ADD (ROUTECONTROL_ID NUMBER NULL);

---------- TRUCK ---------
ALTER TABLE TRUCK ADD (TRUCKBARCODE VARCHAR2(24) NULL);                           