diff --git a/db/update9.5.1.sql b/db/update9.5.1.sql index 8e729a639e..2d0e10af30 100644 --- a/db/update9.5.1.sql +++ b/db/update9.5.1.sql @@ -64,22 +64,7 @@ CREATE TABLE IF NOT EXISTS `zt_log` ( KEY `obejctID` (`objectID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -ALTER TABLE `zt_product` ADD `category` mediumint(8) NOT NULL AFTER `code`; - -ALTER TABLE `zt_task` ADD `parent` INT(11) NULL DEFAULT '0' AFTER `deleted`; -ALTER TABLE `zt_team` ADD `task` INT(11) NULL DEFAULT '0' AFTER `project`; -ALTER TABLE `zt_team` ADD `estimate` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `zt_team` ADD `consumed` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0' AFTER `estimate`; -ALTER TABLE `zt_team` ADD `left` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0' AFTER `consumed`; -ALTER TABLE `zt_team` ADD `order` TINYINT(3) NOT NULL DEFAULT '0' AFTER `left`; -ALTER TABLE `zt_team` CHANGE `days` `days` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'; - -ALTER TABLE `zt_team` DROP PRIMARY KEY; -ALTER TABLE `zt_team` ADD PRIMARY KEY (`project`, `task`, `account`); - -ALTER TABLE `zt_user` ADD `score` INT(12) NOT NULL DEFAULT '0' AFTER `deleted`; -ALTER TABLE `zt_user` ADD `scoreLevel` INT(11) NOT NULL DEFAULT '0' AFTER `score`; - +-- DROP TABLE IF EXISTS `zt_score`; CREATE TABLE `zt_score` ( `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT, `account` varchar(30) NOT NULL, @@ -97,5 +82,22 @@ CREATE TABLE `zt_score` ( KEY `method` (`method`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES ('*/5', '*', '*', '*', '*', 'moduleName=webhook&methodName=asyncSend', '异步发送Webhook', 'zentao', 1, 'normal', '0000-00-00 00:00:00'); +ALTER TABLE `zt_product` ADD `line` mediumint(8) NOT NULL AFTER `code`; + ALTER TABLE `zt_projectstory` ADD `order` smallint(6) unsigned NOT NULL; + +ALTER TABLE `zt_task` ADD `parent` INT(11) NULL DEFAULT '0' AFTER `deleted`; +ALTER TABLE `zt_team` ADD `task` INT(11) NULL DEFAULT '0' AFTER `project`; +ALTER TABLE `zt_team` ADD `estimate` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE `zt_team` ADD `consumed` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0' AFTER `estimate`; +ALTER TABLE `zt_team` ADD `left` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0' AFTER `consumed`; +ALTER TABLE `zt_team` ADD `order` TINYINT(3) NOT NULL DEFAULT '0' AFTER `left`; +ALTER TABLE `zt_team` CHANGE `days` `days` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'; + +ALTER TABLE `zt_team` DROP PRIMARY KEY; +ALTER TABLE `zt_team` ADD PRIMARY KEY (`project`, `task`, `account`); + +ALTER TABLE `zt_user` ADD `score` INT(12) NOT NULL DEFAULT '0' AFTER `deleted`; +ALTER TABLE `zt_user` ADD `scoreLevel` INT(11) NOT NULL DEFAULT '0' AFTER `score`; + +INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES ('*/5', '*', '*', '*', '*', 'moduleName=webhook&methodName=asyncSend', '异步发送Webhook', 'zentao', 1, 'normal', '0000-00-00 00:00:00'); diff --git a/module/upgrade/lang/en.php b/module/upgrade/lang/en.php index b8dd1f84ad..cd3b4db7e6 100644 --- a/module/upgrade/lang/en.php +++ b/module/upgrade/lang/en.php @@ -125,3 +125,4 @@ $lang->upgrade->fromVersions['9_2_1'] = '9.2.1'; $lang->upgrade->fromVersions['9_3_beta'] = '9.3.beta'; $lang->upgrade->fromVersions['9_4'] = '9.4'; $lang->upgrade->fromVersions['9_5'] = '9.5'; +$lang->upgrade->fromVersions['9_5_1'] = '9.5.1'; diff --git a/module/upgrade/lang/zh-cn.php b/module/upgrade/lang/zh-cn.php index 43ceb90eee..834e99f8e5 100644 --- a/module/upgrade/lang/zh-cn.php +++ b/module/upgrade/lang/zh-cn.php @@ -125,3 +125,4 @@ $lang->upgrade->fromVersions['9_2_1'] = '9.2.1'; $lang->upgrade->fromVersions['9_3_beta'] = '9.3.beta'; $lang->upgrade->fromVersions['9_4'] = '9.4'; $lang->upgrade->fromVersions['9_5'] = '9.5'; +$lang->upgrade->fromVersions['9_5_1'] = '9.5.1'; diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 1c5d1a4828..6e9a448360 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -187,6 +187,8 @@ class upgradeModel extends model $this->adjustPriv9_4(); case '9_5': $this->execSQL($this->getUpgradeFile('9.5')); + case '9_5_1': + $this->execSQL($this->getUpgradeFile('9.5.1')); } $this->deletePatch(); @@ -284,6 +286,7 @@ class upgradeModel extends model case '9_3_beta': $confirmContent .= file_get_contents($this->getUpgradeFile('9.3.beta')); case '9_4': $confirmContent .= file_get_contents($this->getUpgradeFile('9.4')); case '9_5': $confirmContent .= file_get_contents($this->getUpgradeFile('9.5')); + case '9_5_1': $confirmContent .= file_get_contents($this->getUpgradeFile('9.5.1')); } return str_replace('zt_', $this->config->db->prefix, $confirmContent); }