* change for upgrade.

This commit is contained in:
wangyidong
2015-03-09 11:35:42 +08:00
parent 8c26498edf
commit 21c77685bb
7 changed files with 46 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
7.0.stable
7.1.stable
+1 -1
View File
@@ -17,7 +17,7 @@ if(!function_exists('getWebRoot')){function getWebRoot(){}}
/* Basic settings. */
$config = new config();
$config->version = '7.0'; // The version of zentaopms. Don't change it.
$config->version = '7.1'; // The version of zentaopms. Don't change it.
$config->charset = 'UTF-8'; // The charset of zentaopms.
$config->cookieLife = time() + 2592000; // The cookie life time.
$config->timezone = 'Asia/Shanghai'; // The time zone setting, for more see http://www.php.net/manual/en/timezones.php
-2
View File
@@ -1,5 +1,3 @@
REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', 'global', 'cron', '0');
DROP TABLE IF EXISTS `zt_cron`;
CREATE TABLE `zt_cron` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+39
View File
@@ -156,6 +156,22 @@ CREATE TABLE IF NOT EXISTS `zt_config` (
PRIMARY KEY (`id`),
UNIQUE KEY `unique` (`owner`,`module`,`section`,`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_cron`;
CREATE TABLE IF NOT EXISTS `zt_cron` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`m` varchar(20) NOT NULL,
`h` varchar(20) NOT NULL,
`dom` varchar(20) NOT NULL,
`mon` varchar(20) NOT NULL,
`dow` varchar(20) NOT NULL,
`command` text NOT NULL,
`remark` varchar(255) NOT NULL,
`type` varchar(20) NOT NULL,
`buildin` tinyint(1) NOT NULL DEFAULT '0',
`status` varchar(20) NOT NULL,
`lastTime` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_lang`;
CREATE TABLE IF NOT EXISTS `zt_lang` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
@@ -288,6 +304,20 @@ CREATE TABLE IF NOT EXISTS `zt_history` (
`diff` mediumtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_mailqueue`;
CREATE TABLE IF NOT EXISTS `zt_mailqueue` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`toList` varchar(255) NOT NULL,
`ccList` varchar(255) NOT NULL,
`subject` varchar(255) NOT NULL,
`body` text NOT NULL,
`addedBy` char(30) NOT NULL,
`addedDate` datetime NOT NULL,
`sendTime` datetime NOT NULL,
`status` varchar(10) NOT NULL DEFAULT 'wait',
`failReason` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_module`;
CREATE TABLE IF NOT EXISTS `zt_module` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
@@ -630,6 +660,15 @@ CREATE TABLE IF NOT EXISTS `zt_usertpl` (
KEY `account` (`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES
('*', '*', '*', '*', '*', '', '监控定时任务', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('30', '23', '*', '*', '*', 'moduleName=project&methodName=computeburn', '更新燃尽图', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('0', '1', '*', '*', '*', 'moduleName=report&methodName=remind', '每日任务提醒', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('*/5', '*', '*', '*', '*', 'moduleName=svn&methodName=run', '同步SVN', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('*/5', '*', '*', '*', '*', 'moduleName=git&methodName=run', '同步GIT', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('30', '0', '*', '*', '*', 'moduleName=backup&methodName=backup', '备份数据和附件', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('*/5', '*', '*', '*', '*', 'moduleName=mail&methodName=asyncSend', '异步发信', 'zentao', 1, 'normal', '0000-00-00 00:00:00');
INSERT INTO `zt_group` (`id`, `name`, `role`, `desc`) VALUES
(1, 'ADMIN', 'admin', 'for administrator'),
(2, 'DEV', 'dev', 'for developers.'),
+1
View File
@@ -88,3 +88,4 @@ $lang->upgrade->fromVersions['6_1'] = '6.1';
$lang->upgrade->fromVersions['6_2'] = '6.2';
$lang->upgrade->fromVersions['6_3'] = '6.3';
$lang->upgrade->fromVersions['6_4'] = '6.4';
$lang->upgrade->fromVersions['7_0'] = '7.0';
+1
View File
@@ -88,3 +88,4 @@ $lang->upgrade->fromVersions['6_1'] = '6.1';
$lang->upgrade->fromVersions['6_2'] = '6.2';
$lang->upgrade->fromVersions['6_3'] = '6.3';
$lang->upgrade->fromVersions['6_4'] = '6.4';
$lang->upgrade->fromVersions['7_0'] = '7.0';
+3
View File
@@ -114,6 +114,8 @@ class upgradeModel extends model
$this->execSQL($this->getUpgradeFile('6.1'));
case '6_2':
case '6_3':
case '7_0':
$this->execSQL($this->getUpgradeFile('7.0'));
default: if(!$this->isError()) $this->setting->updateVersion($this->config->version);
}
@@ -178,6 +180,7 @@ class upgradeModel extends model
case '6_1': $confirmContent .= file_get_contents($this->getUpgradeFile('6.1'));
case '6_2':
case '6_3':
case '7_0': $confirmContent .= file_get_contents($this->getUpgradeFile('7.0'));
}
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
}