
--Work Order in tasktimers table for time logs--
ALTER TABLE `tbltaskstimers` ADD `work_order_id` BIGINT NULL AFTER `visit_id`, ADD INDEX `work_order_id` (`work_order_id`);

ALTER TABLE `tbltaskstimers` CHANGE `type` `type` ENUM('general','task','visit','work_order') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'general';


--Work Order in tblmileage_trips table for mileage logs--
ALTER TABLE `tblmileage_trips` ADD `work_order_id` BIGINT NULL AFTER `visit_id`, ADD INDEX `work_order_id` (`work_order_id`);

ALTER TABLE `tblmileage_trips` CHANGE `trip_for` `trip_for` ENUM('general','task','visit','work_order') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'general';