ALTER TABLE `sys_workflow` ADD `flowchart` text NOT NULL AFTER `name`;
ALTER TABLE `sys_workflow` ADD `status` varchar(10) NOT NULL DEFAULT 'wait' AFTER `version`;

ALTER TABLE `sys_workflowfield` CHANGE `canExport` `canExport` enum('0', '1') NOT NULL DEFAULT '0';
ALTER TABLE `sys_workflowfield` CHANGE `canSearch` `canSearch` enum('0', '1') NOT NULL DEFAULT '0';

UPDATE `sys_workflow` SET `status` = 'normal' WHERE `type` = 'table';
UPDATE `sys_action` SET `action` = 'submitted' WHERE `objectType` IN ('attend', 'leave', 'lieu', 'makeup', 'overtime', 'refund') AND `action` = 'commited';
