-- ABS-59182 / ABS-63231
ALTER TABLE TRUCK ADD (NEXTSERVICEDUEDATE DATE NULL,
                       NEXTSERVICEDUEMILAGE NUMBER(12,2) DEFAULT 0 NOT NULL,
                       SERVICEREMARK VARCHAR2(500) NULL, 
                       LASTSERVICEUSER_ID NUMBER NULL,
                       LASTSERVICETIMESTAMP DATE NULL);
                       
COMMENT ON COLUMN TRUCK.NEXTSERVICEDUEDATE IS 'Only used for BI report';
COMMENT ON COLUMN TRUCK.NEXTSERVICEDUEMILAGE IS 'Only used for BI report';
COMMENT ON COLUMN TRUCK.SERVICEREMARK IS 'Only used for BI report';
COMMENT ON COLUMN TRUCK.LASTSERVICEUSER_ID IS 'Only used for BI report';
COMMENT ON COLUMN TRUCK.LASTSERVICETIMESTAMP IS 'Only used for BI report';
   
CREATE INDEX XIF5TRUCK ON TRUCK (LASTSERVICEUSER_ID ASC);

ALTER TABLE TRUCK
  ADD CONSTRAINT TRUCK_LASTSERVICEUSER FOREIGN KEY (LASTSERVICEUSER_ID)
  REFERENCES SYSTEMUSER (SYSTEMUSER_ID) ON DELETE SET NULL;
