ALTER TABLE `sys_user` ADD `sect` varchar(30) NOT NULL DEFAULT '' AFTER `annualLeave`;
ALTER TABLE `sys_user` ADD `order` mediumint(8) UNSIGNED NOT NULL AFTER `sect`;

ALTER TABLE `crm_contract` ADD `dept` mediumint(8) unsigned NOT NULL AFTER `id`;
ALTER TABLE `crm_contract` ADD `scanFile` tinyint(1) NOT NULL DEFAULT 0 AFTER `nextDate`;
ALTER TABLE `crm_contract` ADD `inspectFile` tinyint(1) NOT NULL DEFAULT 0 AFTER `scanFile`;

UPDATE `crm_contract` AS t1, `sys_user` AS t2 SET t1.dept=t2.dept WHERE t1.createdBy=t2.account;

UPDATE `sys_user` SET `order` = `id`;
