diff --git a/VERSION b/VERSION
index c9333734bd..473655ef25 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-17.6
+17.6.1
diff --git a/api/v1/entries/bugresolve.php b/api/v1/entries/bugresolve.php
index 09243a2163..e6ede3c696 100644
--- a/api/v1/entries/bugresolve.php
+++ b/api/v1/entries/bugresolve.php
@@ -11,7 +11,7 @@
**/
class bugResolveEntry extends Entry
{
- /**
+ /**
* POST method.
*
* @param int $bugID
@@ -19,7 +19,7 @@ class bugResolveEntry extends Entry
* @return void
*/
public function post($bugID)
- {
+ {
$fields = 'resolution,resolvedBuild,resolvedDate,duplicateBug,assignedTo,uid,comment';
$this->batchSetPost($fields);
@@ -33,6 +33,6 @@ class bugResolveEntry extends Entry
$bug = $this->loadModel('bug')->getByID($bugID);
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,resolvedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
- }
+ }
}
diff --git a/api/v1/entries/feedbacks.php b/api/v1/entries/feedbacks.php
index 7e7e3195d5..71d442bd30 100644
--- a/api/v1/entries/feedbacks.php
+++ b/api/v1/entries/feedbacks.php
@@ -22,7 +22,7 @@ class feedbacksEntry extends entry
if(strpos(strtolower($this->param('fields')), 'moduleandproduct') !== false) return $this->getModuleAndProduct();
$control = $this->loadController('feedback', 'admin');
- $control->admin($this->param('solution', 'unclosed'), 0, $this->param('orderBy', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
+ $control->admin($this->param('status', 'unclosed'), 0, $this->param('orderBy', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->sendError(400, 'error');
diff --git a/api/v1/entries/reports.php b/api/v1/entries/reports.php
index fbd15ecaf7..1f79dec801 100644
--- a/api/v1/entries/reports.php
+++ b/api/v1/entries/reports.php
@@ -176,7 +176,7 @@ class reportsEntry extends entry
foreach(array_keys($statusList) as $status)
{
$statusName = zget($this->lang->project->statusList, $status);
- if($status == 'all') $statusName = $this->lang->project->featureBar['all'];
+ if($status == 'all') $statusName = $this->lang->project->featureBar['browse']['all'];
$statusList[$status]['code'] = $status;
$statusList[$status]['name'] = $statusName;
@@ -193,8 +193,7 @@ class reportsEntry extends entry
*/
public function executionProgress()
{
- $executions = $this->loadModel('project')->getStats(0, 'all', 0, 0, 30, 'id_desc');
- $this->app->loadLang('execution');
+ $executions = $this->loadModel('execution')->getStatData(0, 'all', 0, 0, false, '', 'id_desc');
$processedExecutions = array();
$statusList['all']['total'] = 0;
diff --git a/config/config.php b/config/config.php
index e8d0dbd010..b76acef41e 100644
--- a/config/config.php
+++ b/config/config.php
@@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}}
if(!function_exists('getWebRoot')){function getWebRoot(){}}
/* 基本设置。Basic settings. */
-$config->version = '17.6'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
+$config->version = '17.6.1'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->liteVersion = '1.2'; // 迅捷版版本。 The version of Lite.
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
diff --git a/db/standard/zentao17.6.1.sql b/db/standard/zentao17.6.1.sql
new file mode 100644
index 0000000000..5c68d56987
--- /dev/null
+++ b/db/standard/zentao17.6.1.sql
@@ -0,0 +1,4002 @@
+CREATE TABLE `zt_account` (
+ `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `provider` varchar(255) NOT NULL,
+ `adminURI` varchar(255) NOT NULL,
+ `account` varchar(255) NOT NULL,
+ `password` varchar(255) NOT NULL,
+ `email` varchar(255) NOT NULL,
+ `mobile` varchar(255) NOT NULL,
+ `extra` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `name` (`name`),
+ KEY `provider` (`provider`),
+ KEY `status` (`status`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_acl` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL DEFAULT '0',
+ `type` char(40) NOT NULL DEFAULT 'whitelist',
+ `source` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_action` (
+ `id` int(9) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `product` text NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `actor` varchar(100) NOT NULL DEFAULT '',
+ `action` varchar(80) NOT NULL DEFAULT '',
+ `date` datetime NOT NULL,
+ `comment` text NOT NULL,
+ `extra` text,
+ `read` enum('0','1') NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `efforted` tinyint(1) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `date` (`date`),
+ KEY `actor` (`actor`),
+ KEY `project` (`project`),
+ KEY `action` (`action`),
+ KEY `objectID` (`objectID`)
+) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_activity` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `process` mediumint(9) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `optional` varchar(255) NOT NULL,
+ `tailorNorm` varchar(255) NOT NULL,
+ `content` mediumtext NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `order` mediumint(8) DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_api` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `product` varchar(255) NOT NULL DEFAULT '',
+ `lib` int(10) unsigned NOT NULL DEFAULT '0',
+ `module` int(10) unsigned NOT NULL DEFAULT '0',
+ `title` varchar(100) NOT NULL DEFAULT '',
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `protocol` varchar(10) NOT NULL DEFAULT '',
+ `method` varchar(10) NOT NULL DEFAULT '',
+ `requestType` varchar(100) NOT NULL DEFAULT '',
+ `responseType` varchar(100) NOT NULL DEFAULT '',
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL DEFAULT '0',
+ `desc` mediumtext NULL,
+ `version` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `params` text,
+ `paramsExample` text,
+ `responseExample` text,
+ `response` text,
+ `commonParams` text,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '0',
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_api_lib_release` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `lib` int(10) unsigned NOT NULL DEFAULT '0',
+ `desc` varchar(255) NOT NULL DEFAULT '',
+ `version` varchar(255) NOT NULL DEFAULT '',
+ `snap` mediumtext NOT NULL,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_apispec` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `doc` int(10) unsigned NOT NULL DEFAULT '0',
+ `module` int(10) unsigned NOT NULL DEFAULT '0',
+ `title` varchar(100) NOT NULL DEFAULT '',
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `protocol` varchar(10) NOT NULL DEFAULT '',
+ `method` varchar(10) NOT NULL DEFAULT '',
+ `requestType` varchar(100) NOT NULL DEFAULT '',
+ `responseType` varchar(100) NOT NULL DEFAULT '',
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `owner` varchar(255) NOT NULL DEFAULT '0',
+ `desc` mediumtext NULL,
+ `version` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `params` text,
+ `paramsExample` text,
+ `responseExample` text,
+ `response` text,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=176 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_apistruct` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `lib` int(10) unsigned NOT NULL DEFAULT '0',
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `type` varchar(50) NOT NULL DEFAULT '',
+ `desc` mediumtext NOT NULL DEFAULT '',
+ `version` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `attribute` text,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '0',
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_apistruct_spec` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(50) NOT NULL DEFAULT '',
+ `desc` varchar(255) NOT NULL DEFAULT '',
+ `attribute` text,
+ `version` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approval` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `flow` mediumint(8) NOT NULL,
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `nodes` mediumtext NOT NULL,
+ `version` mediumint(9) NOT NULL,
+ `status` varchar(20) NOT NULL DEFAULT 'doing',
+ `result` varchar(20) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` tinyint(4) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalflow` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `code` varchar(100) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `version` mediumint(8) NOT NULL DEFAULT '1',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `deleted` tinyint(4) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalflowobject` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `root` int(8) NOT NULL,
+ `flow` int(8) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `extra` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalflowspec` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `flow` mediumint(8) NOT NULL,
+ `version` mediumint(8) NOT NULL,
+ `nodes` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalnode` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `approval` mediumint(8) NOT NULL,
+ `type` enum('review','cc') NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `account` char(30) NOT NULL,
+ `node` varchar(100) NOT NULL,
+ `reviewType` varchar(100) NOT NULL DEFAULT 'manual',
+ `multipleType` enum('and','or') NOT NULL DEFAULT 'and',
+ `prev` mediumtext NOT NULL,
+ `next` mediumtext NOT NULL,
+ `status` varchar(20) NOT NULL DEFAULT 'wait',
+ `result` varchar(10) NOT NULL,
+ `date` date NOT NULL,
+ `opinion` mediumtext NOT NULL,
+ `extra` mediumtext NOT NULL,
+ `reviewedBy` char(30) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `idx_reviewed_date` (`reviewedDate`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalobject` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `approval` int(8) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(8) NOT NULL,
+ `extra` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalrole` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `code` char(30) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` text NOT NULL,
+ `users` longtext NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_asset` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `group` varchar(128) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_assetlib` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `order` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_attend` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `date` date NOT NULL,
+ `signIn` time NOT NULL,
+ `signOut` time NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `ip` varchar(15) NOT NULL,
+ `device` varchar(30) NOT NULL,
+ `client` varchar(20) NOT NULL,
+ `manualIn` time NOT NULL,
+ `manualOut` time NOT NULL,
+ `reason` varchar(30) NOT NULL DEFAULT '',
+ `desc` text NOT NULL,
+ `reviewStatus` varchar(30) NOT NULL DEFAULT '',
+ `reviewedBy` char(30) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `attend` (`date`,`account`),
+ KEY `account` (`account`),
+ KEY `date` (`date`),
+ KEY `status` (`status`),
+ KEY `reason` (`reason`),
+ KEY `reviewStatus` (`reviewStatus`),
+ KEY `reviewedBy` (`reviewedBy`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_attendstat` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `month` char(10) NOT NULL DEFAULT '',
+ `normal` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `late` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `early` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `absent` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `trip` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `egress` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `lieu` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `paidLeave` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `unpaidLeave` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `timeOvertime` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `restOvertime` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `holidayOvertime` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `deserve` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `actual` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `status` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `attend` (`month`,`account`),
+ KEY `account` (`account`),
+ KEY `month` (`month`),
+ KEY `status` (`status`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_auditcl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `model` char(30) NOT NULL DEFAULT 'waterfall',
+ `practiceArea` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `objectID` int(10) DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_auditplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `dateType` char(30) DEFAULT NULL,
+ `config` text,
+ `objectID` mediumint(9) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `process` mediumint(9) NOT NULL,
+ `processType` char(30) NOT NULL,
+ `checkDate` date NOT NULL,
+ `checkedBy` varchar(30) NOT NULL,
+ `realCheckDate` date NOT NULL,
+ `result` char(30) NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `checkBy` varchar(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_auditresult` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `auditplan` mediumint(8) NOT NULL,
+ `listID` mediumint(8) NOT NULL,
+ `result` char(30) NOT NULL,
+ `checkedBy` varchar(30) NOT NULL,
+ `checkedDate` date NOT NULL,
+ `comment` text NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_baseimage` (
+ `id` smallint(7) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `osType` varchar(50) NOT NULL DEFAULT '',
+ `os` varchar(50) NOT NULL DEFAULT '',
+ `osCategory` varchar(50) NOT NULL DEFAULT '',
+ `osArch` varchar(50) NOT NULL DEFAULT '',
+ `osLang` varchar(50) NOT NULL DEFAULT '',
+ `suggestCore` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ `suggestMemory` mediumint(6) unsigned NOT NULL DEFAULT '0',
+ `suggestVolume` mediumint(6) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_baseimagebrowser` (
+ `vmBackingID` int(10) NOT NULL,
+ `browserID` int(10) NOT NULL,
+ PRIMARY KEY (`vmBackingID`,`browserID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_basicmeas` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `purpose` varchar(50) NOT NULL,
+ `scope` char(30) NOT NULL,
+ `object` char(30) NOT NULL,
+ `name` varchar(90) NOT NULL,
+ `code` char(30) NOT NULL,
+ `unit` varchar(10) NOT NULL,
+ `configure` text,
+ `params` text,
+ `definition` text,
+ `source` varchar(255) DEFAULT NULL,
+ `collectType` varchar(30) NOT NULL,
+ `collectConf` text NOT NULL,
+ `execTime` varchar(30) NOT NULL,
+ `collectedBy` varchar(10) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `order` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`)
+) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_block` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `module` varchar(20) NOT NULL,
+ `type` char(30) NOT NULL,
+ `title` varchar(100) NOT NULL,
+ `source` varchar(20) NOT NULL,
+ `block` varchar(30) NOT NULL,
+ `params` text NOT NULL,
+ `order` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `grid` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `height` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `hidden` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `account_vision_module_type_order` (`account`,`vision`,`module`,`type`,`order`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_branch` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `default` enum('0','1') NOT NULL DEFAULT '0',
+ `status` enum('active','closed') NOT NULL DEFAULT 'active',
+ `desc` varchar(255) NOT NULL,
+ `createdDate` date NOT NULL,
+ `closedDate` date NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_browser` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(255) NOT NULL DEFAULT '',
+ `version` varchar(255) NOT NULL DEFAULT '',
+ `lang` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_budget` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `stage` char(30) NOT NULL,
+ `subject` mediumint(8) NOT NULL,
+ `amount` char(30) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_bug` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `injection` mediumint(8) unsigned NOT NULL,
+ `identify` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `module` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `plan` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `story` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `storyVersion` smallint(6) NOT NULL DEFAULT '1',
+ `task` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `toTask` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `toStory` mediumint(8) NOT NULL DEFAULT '0',
+ `title` varchar(255) NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `severity` tinyint(4) NOT NULL DEFAULT '0',
+ `pri` tinyint(3) unsigned NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `os` varchar(255) NOT NULL DEFAULT '',
+ `browser` varchar(255) NOT NULL DEFAULT '',
+ `hardware` varchar(30) NOT NULL,
+ `found` varchar(30) NOT NULL DEFAULT '',
+ `steps` mediumtext NOT NULL,
+ `status` enum('active','resolved','closed') NOT NULL DEFAULT 'active',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `confirmed` tinyint(1) NOT NULL DEFAULT '0',
+ `activatedCount` smallint(6) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `feedbackBy` varchar(100) NOT NULL,
+ `notifyEmail` varchar(100) NOT NULL,
+ `mailto` text,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `openedBuild` varchar(255) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime NOT NULL,
+ `deadline` date NOT NULL,
+ `resolvedBy` varchar(30) NOT NULL DEFAULT '',
+ `resolution` varchar(30) NOT NULL DEFAULT '',
+ `resolvedBuild` varchar(30) NOT NULL DEFAULT '',
+ `resolvedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `duplicateBug` mediumint(8) unsigned NOT NULL,
+ `linkBug` varchar(255) NOT NULL,
+ `case` mediumint(8) unsigned NOT NULL,
+ `caseVersion` smallint(6) NOT NULL DEFAULT '1',
+ `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `result` mediumint(8) unsigned NOT NULL,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `mr` mediumint(8) unsigned NOT NULL,
+ `entry` text NOT NULL,
+ `lines` varchar(10) NOT NULL,
+ `v1` varchar(40) NOT NULL,
+ `v2` varchar(40) NOT NULL,
+ `repoType` varchar(30) NOT NULL DEFAULT '',
+ `issueKey` varchar(50) NOT NULL DEFAULT '',
+ `testtask` mediumint(8) unsigned NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`),
+ KEY `status` (`status`),
+ KEY `plan` (`plan`),
+ KEY `story` (`story`),
+ KEY `case` (`case`),
+ KEY `toStory` (`toStory`),
+ KEY `result` (`result`),
+ KEY `assignedTo` (`assignedTo`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_build` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `name` char(150) NOT NULL,
+ `scmPath` char(255) NOT NULL,
+ `filePath` char(255) NOT NULL,
+ `date` date NOT NULL,
+ `stories` text NOT NULL,
+ `bugs` text NOT NULL,
+ `builder` char(30) NOT NULL DEFAULT '',
+ `desc` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_burn` (
+ `execution` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `date` date NOT NULL,
+ `estimate` float NOT NULL,
+ `left` float NOT NULL,
+ `consumed` float NOT NULL,
+ `storyPoint` float NOT NULL,
+ PRIMARY KEY (`execution`,`date`,`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_case` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `execution` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `module` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `story` mediumint(30) unsigned NOT NULL DEFAULT '0',
+ `storyVersion` smallint(6) NOT NULL DEFAULT '1',
+ `title` varchar(255) NOT NULL,
+ `precondition` text NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT '3',
+ `type` char(30) NOT NULL DEFAULT '1',
+ `auto` varchar(10) NOT NULL DEFAULT 'no',
+ `frame` varchar(10) NOT NULL,
+ `stage` varchar(255) NOT NULL,
+ `howRun` varchar(30) NOT NULL,
+ `scriptedBy` varchar(30) NOT NULL,
+ `scriptedDate` date NOT NULL,
+ `scriptStatus` varchar(30) NOT NULL,
+ `scriptLocation` varchar(255) NOT NULL,
+ `status` char(30) NOT NULL DEFAULT '1',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `frequency` enum('1','2','3') NOT NULL DEFAULT '1',
+ `order` tinyint(30) unsigned NOT NULL DEFAULT '0',
+ `openedBy` char(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `reviewedBy` varchar(255) NOT NULL,
+ `reviewedDate` date NOT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `version` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `linkCase` varchar(255) NOT NULL,
+ `fromBug` mediumint(8) unsigned NOT NULL,
+ `fromCaseID` mediumint(8) unsigned NOT NULL,
+ `fromCaseVersion` mediumint(8) unsigned NOT NULL DEFAULT '1',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `lastRunner` varchar(30) NOT NULL,
+ `lastRunDate` datetime NOT NULL,
+ `lastRunResult` char(30) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `story` (`story`),
+ KEY `fromBug` (`fromBug`),
+ KEY `module` (`module`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_casestep` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `case` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` smallint(3) unsigned NOT NULL DEFAULT '0',
+ `type` varchar(10) NOT NULL DEFAULT 'step',
+ `desc` text NOT NULL,
+ `expect` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `case` (`case`),
+ KEY `version` (`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_cfd` (
+ `id` int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `execution` int(8) NOT NULL,
+ `type` char(30) NOT NULL,
+ `name` char(30) NOT NULL,
+ `count` smallint NOT NULL,
+ `date` date NOT NULL,
+ UNIQUE KEY `execution_type_name_date` (`execution`,`type`,`name`,`date`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_cmcl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` char(30) NOT NULL,
+ `title` int(11) NOT NULL,
+ `contents` text NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `order` int(11) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_company` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(120) DEFAULT NULL,
+ `phone` char(20) DEFAULT NULL,
+ `fax` char(20) DEFAULT NULL,
+ `address` char(120) DEFAULT NULL,
+ `zipcode` char(10) DEFAULT NULL,
+ `website` char(120) DEFAULT NULL,
+ `backyard` char(120) DEFAULT NULL,
+ `guest` enum('1','0') NOT NULL DEFAULT '0',
+ `admins` char(255) DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_compile` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `job` mediumint(8) unsigned NOT NULL,
+ `queue` mediumint(8) NOT NULL,
+ `status` varchar(255) NOT NULL,
+ `logs` text,
+ `atTime` varchar(10) NOT NULL,
+ `testtask` mediumint(8) unsigned NOT NULL,
+ `tag` varchar(255) NOT NULL,
+ `times` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `updateDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_config` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `owner` char(30) NOT NULL DEFAULT '',
+ `module` varchar(30) NOT NULL,
+ `section` char(30) NOT NULL DEFAULT '',
+ `key` char(30) NOT NULL DEFAULT '',
+ `value` longtext NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`vision`,`owner`,`module`,`section`,`key`)
+) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
+CREATE TABLE `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`),
+ KEY `lastTime` (`lastTime`)
+) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deploy` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `begin` datetime NOT NULL,
+ `end` datetime NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `status` varchar(20) NOT NULL,
+ `owner` char(30) NOT NULL,
+ `members` text NOT NULL,
+ `notify` text NOT NULL,
+ `cases` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `result` varchar(20) NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_chart` (
+ `id` mediumint NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `dataset` varchar(30) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `settings` mediumtext NOT NULL,
+ `filters` mediumtext NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` tinyint NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dashboard` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `module` mediumint NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `layout` mediumtext NOT NULL,
+ `filters` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` tinyint NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dataset` (
+ `id` mediumint unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(155) NOT NULL,
+ `sql` text NOT NULL,
+ `fields` mediumtext NOT NULL,
+ `objects` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` tinyint NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deployproduct` (
+ `deploy` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `release` mediumint(8) unsigned NOT NULL,
+ `package` varchar(255) NOT NULL,
+ UNIQUE KEY `deploy_product_release` (`deploy`,`product`,`release`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deployscope` (
+ `deploy` mediumint(8) unsigned NOT NULL,
+ `service` mediumint(8) unsigned NOT NULL,
+ `hosts` text NOT NULL,
+ `remove` text NOT NULL,
+ `add` text NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deploystep` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `deploy` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `begin` datetime NOT NULL,
+ `end` datetime NOT NULL,
+ `stage` varchar(30) NOT NULL,
+ `content` text NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `assignedTo` char(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `finishedBy` char(30) NOT NULL,
+ `finishedDate` datetime NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dept` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(60) NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `order` smallint(4) unsigned NOT NULL DEFAULT '0',
+ `position` char(30) NOT NULL DEFAULT '',
+ `function` char(255) NOT NULL DEFAULT '',
+ `manager` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `path` (`path`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_design` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` varchar(255) NOT NULL,
+ `product` varchar(255) NOT NULL,
+ `commit` text NOT NULL,
+ `commitedBy` varchar(30) NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `name` varchar(255) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `story` char(30) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `type` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_designspec` (
+ `design` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `files` varchar(255) NOT NULL,
+ UNIQUE KEY `design` (`design`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doc` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `lib` varchar(30) NOT NULL,
+ `template` varchar(30) NOT NULL,
+ `templateType` varchar(30) NOT NULL,
+ `chapterType` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `parent` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `order` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `views` smallint(5) unsigned NOT NULL,
+ `assetLib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `assetLibType` varchar(30) NOT NULL DEFAULT '',
+ `from` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `fromVersion` smallint(6) NOT NULL DEFAULT '1',
+ `draft` longtext NOT NULL,
+ `collector` text NOT NULL,
+ `addedBy` varchar(30) NOT NULL,
+ `addedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `approvedDate` date NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `mailto` text,
+ `acl` varchar(10) NOT NULL DEFAULT 'open',
+ `groups` varchar(255) NOT NULL,
+ `users` text NOT NULL,
+ `version` smallint(5) unsigned NOT NULL DEFAULT '1',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`),
+ KEY `lib` (`lib`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doccontent` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `doc` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `digest` varchar(255) NOT NULL,
+ `content` longtext NOT NULL,
+ `files` text NOT NULL,
+ `type` varchar(10) NOT NULL,
+ `version` smallint(5) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `doc_version` (`doc`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doclib` (
+ `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(30) NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `product` mediumint(8) unsigned NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `name` varchar(60) NOT NULL,
+ `baseUrl` varchar(255) NOT NULL DEFAULT '',
+ `acl` varchar(10) NOT NULL DEFAULT 'open',
+ `groups` varchar(255) NOT NULL,
+ `users` text NOT NULL,
+ `main` enum('0','1') NOT NULL DEFAULT '0',
+ `collector` text NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `order` tinyint(5) unsigned NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_domain` (
+ `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
+ `domain` varchar(255) NOT NULL,
+ `adminURI` varchar(255) NOT NULL,
+ `resolverURI` varchar(255) NOT NULL,
+ `register` varchar(255) NOT NULL,
+ `expiredDate` datetime NOT NULL,
+ `renew` varchar(255) NOT NULL,
+ `account` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `domain` (`domain`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_durationestimation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `stage` mediumint(9) NOT NULL,
+ `workload` varchar(255) NOT NULL,
+ `worktimeRate` varchar(255) NOT NULL,
+ `people` varchar(255) NOT NULL,
+ `startDate` date NOT NULL,
+ `endDate` date NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_effort` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `product` text NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `account` varchar(30) NOT NULL,
+ `work` text,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `date` date NOT NULL,
+ `left` float NOT NULL,
+ `consumed` float NOT NULL,
+ `begin` smallint(4) unsigned zerofill NOT NULL,
+ `end` smallint(4) unsigned zerofill NOT NULL,
+ `order` tinyint unsigned NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `execution` (`execution`),
+ KEY `objectID` (`objectID`),
+ KEY `date` (`date`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_entry` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `account` varchar(30) NOT NULL DEFAULT '',
+ `code` varchar(20) NOT NULL,
+ `key` varchar(32) NOT NULL,
+ `freePasswd` enum('0','1') NOT NULL DEFAULT '0',
+ `ip` varchar(100) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `calledTime` int(10) unsigned NOT NULL DEFAULT '0',
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_expect` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `userID` mediumint(8) NOT NULL,
+ `project` mediumint(8) NOT NULL DEFAULT '0',
+ `expect` text NOT NULL,
+ `progress` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_extension` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(150) NOT NULL,
+ `code` varchar(30) NOT NULL,
+ `version` varchar(50) NOT NULL,
+ `author` varchar(100) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `license` text NOT NULL,
+ `type` varchar(20) NOT NULL DEFAULT 'extension',
+ `site` varchar(150) NOT NULL,
+ `zentaoCompatible` varchar(100) NOT NULL,
+ `installedTime` datetime NOT NULL,
+ `depends` varchar(100) NOT NULL,
+ `dirs` mediumtext NOT NULL,
+ `files` mediumtext NOT NULL,
+ `status` varchar(20) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`),
+ KEY `name` (`name`),
+ KEY `installedTime` (`installedTime`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_faq` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `module` mediumint(9) NOT NULL,
+ `product` mediumint(9) NOT NULL,
+ `question` varchar(255) NOT NULL,
+ `answer` text NOT NULL,
+ `addedtime` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_feedback` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL,
+ `module` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `type` char(30) NOT NULL,
+ `solution` char(30) NOT NULL,
+ `desc` text NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `public` enum('0','1') NOT NULL DEFAULT '0',
+ `notify` enum('0','1') NOT NULL DEFAULT '0',
+ `notifyEmail` varchar(100) NOT NULL,
+ `likes` text NOT NULL,
+ `result` mediumint(8) unsigned NOT NULL,
+ `faq` mediumint(8) unsigned NOT NULL,
+ `openedBy` char(30) NOT NULL,
+ `openedDate` datetime NOT NULL,
+ `reviewedBy` varchar(255) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ `processedBy` char(30) NOT NULL,
+ `processedDate` datetime NOT NULL,
+ `closedBy` char(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `closedReason` varchar(30) NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedTo` varchar(255) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `feedbackBy` varchar(100) NOT NULL,
+ `repeatFeedback` mediumint(8) NOT NULL DEFAULT 0,
+ `mailto` varchar(255) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_feedbackview` (
+ `account` char(30) NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ UNIQUE KEY `account_product` (`account`,`product`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_file` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `pathname` char(100) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `extension` char(30) NOT NULL,
+ `size` int(10) unsigned NOT NULL DEFAULT '0',
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `addedBy` char(30) NOT NULL DEFAULT '',
+ `addedDate` datetime NOT NULL,
+ `downloads` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `extra` varchar(255) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `objectType` (`objectType`),
+ KEY `objectID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_gapanalysis` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `account` varchar(30) NOT NULL,
+ `role` varchar(20) NOT NULL,
+ `analysis` mediumtext NOT NULL,
+ `needTrain` enum('no','yes') NOT NULL DEFAULT 'no',
+ `createdBy` char(30) DEFAULT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `project_account` (`project`,`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_group` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `name` char(30) NOT NULL,
+ `role` char(30) NOT NULL DEFAULT '',
+ `desc` char(255) NOT NULL DEFAULT '',
+ `acl` text,
+ `developer` enum('0','1') NOT NULL DEFAULT '1',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_grouppriv` (
+ `group` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `module` char(30) NOT NULL DEFAULT '',
+ `method` char(30) NOT NULL DEFAULT '',
+ UNIQUE KEY `group` (`group`,`module`,`method`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_history` (
+ `id` int(9) unsigned NOT NULL AUTO_INCREMENT,
+ `action` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `field` varchar(30) NOT NULL DEFAULT '',
+ `old` text NOT NULL,
+ `new` text NOT NULL,
+ `diff` mediumtext NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `action` (`action`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_holiday` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `type` enum('holiday','working') NOT NULL DEFAULT 'holiday',
+ `desc` mediumtext NOT NULL,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_host` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `assetID` mediumint(8) unsigned NOT NULL,
+ `admin` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `serverRoom` mediumint(8) unsigned NOT NULL,
+ `cabinet` varchar(128) NOT NULL,
+ `serverModel` varchar(256) NOT NULL,
+ `hardwareType` varchar(64) NOT NULL,
+ `hostType` enum('physical','virtual') NOT NULL,
+ `cpuBrand` varchar(128) NOT NULL,
+ `cpuModel` varchar(128) NOT NULL,
+ `cpuNumber` varchar(16) NOT NULL,
+ `cpuCores` varchar(30) NOT NULL,
+ `cpuRate` varchar(30) NOT NULL,
+ `memory` varchar(30) NOT NULL,
+ `diskType` varchar(30) NOT NULL,
+ `diskSize` varchar(30) NOT NULL,
+ `unit` enum('GB','TB') NOT NULL DEFAULT 'GB',
+ `privateIP` varchar(128) NOT NULL,
+ `publicIP` varchar(128) NOT NULL,
+ `nic` varchar(128) NOT NULL,
+ `mac` varchar(128) NOT NULL,
+ `osName` varchar(64) NOT NULL,
+ `osVersion` varchar(64) NOT NULL,
+ `webserver` varchar(128) NOT NULL,
+ `database` varchar(128) NOT NULL,
+ `language` varchar(16) NOT NULL,
+ `status` varchar(50) NOT NULL,
+ `agentPort` varchar(10) NOT NULL,
+ `instanceNum` tinyint(4) NOT NULL DEFAULT '0',
+ `pri` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `heartbeatTime` datetime NOT NULL,
+ `tags` varchar(50) NOT NULL DEFAULT '',
+ `provider` varchar(255) NOT NULL DEFAULT '',
+ `bridgeID` varchar(255) NOT NULL DEFAULT '',
+ `cloudKey` varchar(255) NOT NULL DEFAULT '',
+ `cloudSecret` varchar(255) NOT NULL DEFAULT '',
+ `cloudRegion` varchar(255) NOT NULL DEFAULT '',
+ `cloudNamespace` varchar(255) NOT NULL DEFAULT '',
+ `cloudUser` varchar(255) NOT NULL DEFAULT '',
+ `cloudAccount` varchar(255) NOT NULL DEFAULT '',
+ `cloudPassword` varchar(255) NOT NULL DEFAULT '',
+ `couldVPC` varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_chat` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `gid` char(40) NOT NULL DEFAULT '',
+ `name` varchar(60) NOT NULL DEFAULT '',
+ `type` varchar(20) NOT NULL DEFAULT 'group',
+ `admins` varchar(255) NOT NULL DEFAULT '',
+ `committers` varchar(255) NOT NULL DEFAULT '',
+ `subject` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `public` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `ownedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `mergedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `lastActiveTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `lastMessage` int(11) unsigned NOT NULL DEFAULT '0',
+ `lastMessageIndex` int(11) unsigned NOT NULL DEFAULT 0,
+ `dismissDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `pinnedMessages` text NOT NULL,
+ `mergedChats` text NOT NULL DEFAULT '',
+ `adminInvite` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `gid` (`gid`),
+ KEY `name` (`name`),
+ KEY `type` (`type`),
+ KEY `public` (`public`),
+ KEY `createdBy` (`createdBy`),
+ KEY `editedBy` (`editedBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_chat_message_index` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `gid` char(40) NOT NULL,
+ `tableName` char(64) NOT NULL,
+ `start` int(11) unsigned NOT NULL,
+ `end` int(11) unsigned NOT NULL,
+ `startIndex` int(11) unsigned NOT NULL,
+ `endIndex` int(11) unsigned NOT NULL,
+ `startDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `count` mediumint(8) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `chattable` (`gid`,`tableName`),
+ KEY `start` (`start`),
+ KEY `end` (`end`),
+ KEY `startDate` (`startDate`),
+ KEY `endDate` (`endDate`),
+ KEY `chatstartindex` (`gid`,`startIndex`),
+ KEY `chatendindex` (`gid`,`endIndex`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_chatuser` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `user` mediumint(8) NOT NULL DEFAULT '0',
+ `order` smallint(5) NOT NULL DEFAULT '0',
+ `star` enum('0','1') NOT NULL DEFAULT '0',
+ `hide` enum('0','1') NOT NULL DEFAULT '0',
+ `mute` enum('0','1') NOT NULL DEFAULT '0',
+ `freeze` enum('0','1') NOT NULL DEFAULT '0',
+ `join` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `quit` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `category` varchar(40) NOT NULL DEFAULT '',
+ `lastReadMessage` int(11) unsigned NOT NULL DEFAULT '0',
+ `lastReadMessageIndex` int(11) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `chatuser` (`cgid`,`user`),
+ KEY `cgid` (`cgid`),
+ KEY `user` (`user`),
+ KEY `order` (`order`),
+ KEY `star` (`star`),
+ KEY `hide` (`hide`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_client` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `version` char(30) NOT NULL DEFAULT '',
+ `desc` varchar(100) NOT NULL DEFAULT '',
+ `changeLog` text NOT NULL,
+ `strategy` varchar(10) NOT NULL DEFAULT '',
+ `downloads` text NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `status` enum('released','wait') NOT NULL DEFAULT 'wait',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_conference` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `rid` char(40) NOT NULL DEFAULT '',
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `status` enum('closed','open') NOT NULL DEFAULT 'closed',
+ `participants` text NOT NULL,
+ `invitee` text NOT NULL,
+ `openedBy` mediumint(8) NOT NULL DEFAULT '0',
+ `openedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_conferenceaction` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `rid` char(40) NOT NULL DEFAULT '',
+ `type` enum('create','invite','join','leave','close','publish') NOT NULL DEFAULT 'create',
+ `data` text NOT NULL,
+ `user` mediumint(8) NOT NULL DEFAULT '0',
+ `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `device` char(40) NOT NULL DEFAULT 'default',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_message` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `gid` char(40) NOT NULL DEFAULT '',
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `user` varchar(30) NOT NULL DEFAULT '',
+ `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `index` int(11) unsigned NOT NULL DEFAULT 0,
+ `type` enum('normal','broadcast','notify','bulletin') NOT NULL DEFAULT 'normal',
+ `content` text NOT NULL,
+ `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text',
+ `data` text NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `mgid` (`gid`),
+ KEY `mcgid` (`cgid`),
+ KEY `muser` (`user`),
+ KEY `mtype` (`type`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_message_backup` (
+ `id` int(11) unsigned NOT NULL,
+ `gid` char(40) NOT NULL DEFAULT '',
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `user` varchar(30) NOT NULL DEFAULT '',
+ `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `index` int(11) unsigned NOT NULL DEFAULT 0,
+ `type` enum('normal','broadcast','notify') NOT NULL DEFAULT 'normal',
+ `content` text NOT NULL,
+ `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text',
+ `data` text NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_message_index` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `tableName` char(64) NOT NULL,
+ `start` int(11) unsigned NOT NULL,
+ `end` int(11) unsigned NOT NULL,
+ `startDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `chats` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `tableName` (`tableName`),
+ KEY `start` (`start`),
+ KEY `end` (`end`),
+ KEY `startDate` (`startDate`),
+ KEY `endDate` (`endDate`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_messagestatus` (
+ `user` mediumint(8) NOT NULL DEFAULT '0',
+ `message` int(11) unsigned NOT NULL,
+ `status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting',
+ UNIQUE KEY `user` (`user`,`message`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_queue` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` char(30) NOT NULL,
+ `content` text NOT NULL,
+ `addDate` datetime NOT NULL,
+ `processDate` datetime NOT NULL,
+ `result` text NOT NULL,
+ `status` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_userdevice` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `user` mediumint(8) NOT NULL DEFAULT '0',
+ `device` char(40) NOT NULL DEFAULT 'default',
+ `deviceID` char(40) NOT NULL DEFAULT '',
+ `token` char(64) NOT NULL DEFAULT '',
+ `validUntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `lastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `lastLogout` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `userdevice` (`user`,`device`),
+ KEY `user` (`user`),
+ KEY `lastLogin` (`lastLogin`),
+ KEY `lastLogout` (`lastLogout`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_intervention` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `activity` mediumint(8) NOT NULL,
+ `status` char(30) NOT NULL,
+ `partake` text NOT NULL,
+ `begin` date NOT NULL,
+ `realBegin` date NOT NULL,
+ `situation` varchar(255) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `project` (`project`,`activity`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_issue` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `resolvedBy` varchar(30) NOT NULL,
+ `project` varchar(255) NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `pri` char(30) NOT NULL,
+ `severity` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `activity` varchar(255) NOT NULL,
+ `deadline` date NOT NULL,
+ `resolution` char(30) NOT NULL,
+ `resolutionComment` text NOT NULL,
+ `objectID` varchar(255) NOT NULL,
+ `resolvedDate` date NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `owner` varchar(255) NOT NULL,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `from` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `activateBy` varchar(30) NOT NULL,
+ `activateDate` date NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` date NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `approvedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_job` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `frame` varchar(20) NOT NULL,
+ `engine` varchar(20) NOT NULL,
+ `server` mediumint(8) unsigned NOT NULL,
+ `pipeline` varchar(500) NOT NULL,
+ `triggerType` varchar(255) NOT NULL,
+ `sonarqubeServer` mediumint(8) unsigned NOT NULL,
+ `projectKey` varchar(255) NOT NULL,
+ `svnDir` varchar(255) NOT NULL,
+ `atDay` varchar(255) DEFAULT NULL,
+ `atTime` varchar(10) DEFAULT NULL,
+ `customParam` text NOT NULL,
+ `comment` varchar(255) DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `lastExec` datetime DEFAULT NULL,
+ `lastStatus` varchar(255) DEFAULT NULL,
+ `lastTag` varchar(255) DEFAULT NULL,
+ `lastSyncDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanban` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `space` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `owner` varchar(30) NOT NULL,
+ `team` text NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `archived` enum('0','1') NOT NULL DEFAULT '1',
+ `performable` enum('0','1') NOT NULL DEFAULT '0',
+ `status` enum('active','closed') NOT NULL DEFAULT 'active',
+ `order` mediumint(8) NOT NULL DEFAULT '0',
+ `displayCards` smallint(6) NOT NULL DEFAULT '0',
+ `showWIP` enum('0','1') NOT NULL DEFAULT '1',
+ `fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
+ `object` varchar(255) NOT NULL,
+ `alignment` varchar(10) NOT NULL DEFAULT 'center',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `closedBy` char(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `activatedBy` char(30) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbancard` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `kanban` mediumint(8) unsigned NOT NULL,
+ `region` mediumint(8) unsigned NOT NULL,
+ `group` mediumint(8) unsigned NOT NULL,
+ `fromID` mediumint(8) unsigned NOT NULL,
+ `fromType` varchar(30) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT 'doing',
+ `pri` mediumint(8) unsigned NOT NULL,
+ `assignedTo` text NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `estimate` float unsigned NOT NULL,
+ `progress` float unsigned NOT NULL DEFAULT '0',
+ `color` char(7) NOT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `order` mediumint(8) NOT NULL DEFAULT '0',
+ `archived` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `archivedBy` char(30) NOT NULL,
+ `archivedDate` datetime NOT NULL,
+ `assignedBy` char(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbancell` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `kanban` mediumint(8) NOT NULL,
+ `lane` mediumint(8) NOT NULL,
+ `column` mediumint(8) NOT NULL,
+ `type` char(30) NOT NULL,
+ `cards` text NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `card_group` (`kanban`,`type`,`lane`,`column`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbancolumn` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `parent` mediumint(8) NOT NULL DEFAULT '0',
+ `type` char(30) NOT NULL,
+ `region` mediumint(8) unsigned NOT NULL,
+ `group` mediumint(8) NOT NULL DEFAULT '0',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `color` char(30) NOT NULL,
+ `limit` smallint(6) NOT NULL DEFAULT '-1',
+ `order` mediumint(8) NOT NULL DEFAULT '0',
+ `archived` enum('0','1') NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbangroup` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `kanban` mediumint(8) unsigned NOT NULL,
+ `region` mediumint(8) unsigned NOT NULL,
+ `order` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbanlane` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `execution` mediumint(8) NOT NULL DEFAULT '0',
+ `type` char(30) NOT NULL,
+ `region` mediumint(8) unsigned NOT NULL,
+ `group` mediumint(8) unsigned NOT NULL,
+ `groupby` char(30) NOT NULL,
+ `extra` char(30) NOT NULL,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `color` char(30) NOT NULL,
+ `order` smallint(6) NOT NULL DEFAULT '0',
+ `lastEditedTime` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbanregion` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `space` mediumint(8) unsigned NOT NULL,
+ `kanban` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `order` mediumint(8) NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbanspace` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(50) NOT NULL,
+ `owner` varchar(30) NOT NULL,
+ `team` text NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `status` enum('active','closed') NOT NULL DEFAULT 'active',
+ `order` mediumint(8) NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `closedBy` char(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `activatedBy` char(30) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_lang` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `lang` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `section` varchar(30) NOT NULL,
+ `key` varchar(60) NOT NULL,
+ `value` text NOT NULL,
+ `system` enum('0','1') NOT NULL DEFAULT '1',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`,`vision`)
+) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_leave` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `start` time NOT NULL,
+ `finish` time NOT NULL,
+ `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0',
+ `backDate` datetime NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `desc` text NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `reviewedBy` char(30) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ `level` tinyint(3) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `reviewers` text NOT NULL,
+ `backReviewers` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `type` (`type`),
+ KEY `status` (`status`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_lieu` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `start` time NOT NULL,
+ `finish` time NOT NULL,
+ `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0',
+ `overtime` char(255) NOT NULL,
+ `trip` char(255) NOT NULL,
+ `desc` text NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `reviewedBy` char(30) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ `level` tinyint(3) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `reviewers` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `status` (`status`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_log` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `action` mediumint(8) unsigned NOT NULL,
+ `date` datetime NOT NULL,
+ `url` varchar(255) NOT NULL,
+ `contentType` varchar(30) NOT NULL,
+ `data` text NOT NULL,
+ `result` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `objectType` (`objectType`),
+ KEY `obejctID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_measqueue` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(30) NOT NULL,
+ `mid` mediumint(8) unsigned NOT NULL,
+ `status` varchar(255) NOT NULL,
+ `logs` text,
+ `execTime` varchar(10) NOT NULL,
+ `params` text,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `updateDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_measrecords` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `type` varchar(30) NOT NULL,
+ `mid` mediumint(8) NOT NULL,
+ `measCode` char(50) NOT NULL DEFAULT '',
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `params` text NOT NULL,
+ `year` char(4) NOT NULL,
+ `month` char(6) NOT NULL,
+ `week` char(8) NOT NULL,
+ `day` char(8) NOT NULL,
+ `value` varchar(255) NOT NULL,
+ `date` date NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `project` (`project`),
+ KEY `time` (`year`,`month`,`day`,`week`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_meastemplate` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `model` char(30) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `content` mediumtext NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_meeting` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL,
+ `execution` mediumint(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `begin` time NOT NULL,
+ `end` time NOT NULL,
+ `dept` mediumint(8) NOT NULL,
+ `mode` varchar(255) NOT NULL,
+ `host` varchar(30) NOT NULL,
+ `participant` text NOT NULL,
+ `date` date NOT NULL,
+ `room` int(11) NOT NULL,
+ `minutes` text NOT NULL,
+ `minutedBy` varchar(30) NOT NULL,
+ `minutedDate` datetime NOT NULL,
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(8) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_meetingroom` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `position` varchar(30) NOT NULL,
+ `seats` int(11) NOT NULL,
+ `equipment` varchar(255) NOT NULL,
+ `openTime` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_module` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `root` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `name` char(60) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `order` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `type` char(30) NOT NULL,
+ `from` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `owner` varchar(30) NOT NULL,
+ `collector` text NOT NULL,
+ `short` varchar(30) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `root` (`root`),
+ KEY `type` (`type`),
+ KEY `path` (`path`)
+) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_mr` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `hostID` mediumint(8) unsigned NOT NULL,
+ `sourceProject` varchar(50) NOT NULL,
+ `sourceBranch` varchar(100) NOT NULL,
+ `targetProject` varchar(50) NOT NULL,
+ `targetBranch` varchar(100) NOT NULL,
+ `mriid` int(10) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `description` text NOT NULL,
+ `assignee` varchar(255) NOT NULL,
+ `reviewer` varchar(255) NOT NULL,
+ `approver` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `status` char(30) NOT NULL,
+ `mergeStatus` char(30) NOT NULL,
+ `approvalStatus` char(30) NOT NULL,
+ `needApproved` enum('0','1') NOT NULL DEFAULT '0',
+ `needCI` enum('0','1') NOT NULL DEFAULT '0',
+ `repoID` mediumint(8) unsigned NOT NULL,
+ `jobID` mediumint(8) unsigned NOT NULL,
+ `compileID` mediumint(8) unsigned NOT NULL,
+ `compileStatus` char(30) NOT NULL,
+ `removeSourceBranch` enum('0','1') NOT NULL DEFAULT '0',
+ `synced` enum('0','1') NOT NULL DEFAULT '1',
+ `syncError` varchar(255) NOT NULL,
+ `hasNoConflict` enum('0','1') NOT NULL DEFAULT '0',
+ `diffs` longtext,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_mrapproval` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `mrID` mediumint(8) unsigned NOT NULL,
+ `account` varchar(255) NOT NULL,
+ `date` datetime NOT NULL,
+ `action` char(30) NOT NULL,
+ `comment` text NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_nc` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `auditplan` mediumint(8) NOT NULL,
+ `listID` mediumint(8) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `type` char(30) NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT 'active',
+ `severity` char(30) NOT NULL,
+ `deadline` date NOT NULL,
+ `resolvedBy` varchar(30) NOT NULL,
+ `resolution` char(30) NOT NULL,
+ `resolvedDate` date NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` date NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` date NOT NULL,
+ `activateDate` date NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_notify` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(50) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `action` mediumint(9) NOT NULL,
+ `toList` varchar(255) NOT NULL,
+ `ccList` text NOT NULL,
+ `subject` varchar(255) NOT NULL,
+ `data` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `sendTime` datetime NOT NULL,
+ `status` varchar(10) NOT NULL DEFAULT 'wait',
+ `failReason` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `objectType_toList_status` (`objectType`,`toList`,`status`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_oauth` (
+ `account` varchar(30) NOT NULL,
+ `openID` varchar(255) NOT NULL,
+ `providerType` varchar(30) NOT NULL,
+ `providerID` mediumint(8) unsigned NOT NULL,
+ KEY `account` (`account`),
+ KEY `providerType` (`providerType`),
+ KEY `providerID` (`providerID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_object` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) NOT NULL,
+ `from` mediumint(8) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `category` char(30) NOT NULL,
+ `version` varchar(255) NOT NULL,
+ `type` enum('reviewed','taged') NOT NULL,
+ `range` text NOT NULL,
+ `data` text NOT NULL,
+ `storyEst` char(30) NOT NULL,
+ `taskEst` char(30) NOT NULL,
+ `requestEst` char(30) NOT NULL,
+ `testEst` char(30) NOT NULL,
+ `devEst` char(30) NOT NULL,
+ `designEst` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_opportunity` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `source` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `strategy` char(30) NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT 'active',
+ `impact` mediumint(8) NOT NULL,
+ `chance` mediumint(8) NOT NULL,
+ `ratio` mediumint(8) NOT NULL,
+ `pri` char(30) NOT NULL,
+ `identifiedDate` date NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` date NOT NULL,
+ `approvedDate` date NOT NULL,
+ `prevention` mediumtext NOT NULL,
+ `plannedClosedDate` date NOT NULL,
+ `actualClosedDate` date NOT NULL,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `from` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `activatedBy` varchar(30) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `canceledBy` varchar(30) NOT NULL,
+ `canceledDate` datetime NOT NULL,
+ `cancelReason` char(30) NOT NULL,
+ `hangupedBy` varchar(30) NOT NULL,
+ `hangupedDate` datetime NOT NULL,
+ `resolution` mediumtext NOT NULL,
+ `resolvedBy` varchar(30) NOT NULL,
+ `resolvedDate` datetime NOT NULL,
+ `lastCheckedBy` varchar(30) NOT NULL,
+ `lastCheckedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_overtime` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `start` time NOT NULL,
+ `finish` time NOT NULL,
+ `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0',
+ `leave` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `desc` text NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `rejectReason` varchar(100) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `reviewedBy` char(30) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ `level` tinyint(3) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `reviewers` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `type` (`type`),
+ KEY `status` (`status`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_pipeline` (
+ `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` char(30) NOT NULL,
+ `name` varchar(50) NOT NULL,
+ `url` varchar(255) DEFAULT NULL,
+ `account` varchar(30) DEFAULT NULL,
+ `password` varchar(255) NOT NULL,
+ `token` varchar(255) DEFAULT NULL,
+ `private` char(32) DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_planstory` (
+ `plan` mediumint(8) unsigned NOT NULL,
+ `story` mediumint(8) unsigned NOT NULL,
+ `order` mediumint(9) NOT NULL,
+ UNIQUE KEY `plan_story` (`plan`,`story`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_process` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `model` char(30) NOT NULL DEFAULT 'waterfall',
+ `name` varchar(255) NOT NULL,
+ `type` char(30) NOT NULL,
+ `abbr` char(30) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `order` mediumint(9) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_product` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `program` mediumint(8) unsigned NOT NULL,
+ `name` varchar(90) NOT NULL,
+ `code` varchar(45) NOT NULL,
+ `bind` enum('0','1') NOT NULL DEFAULT '0',
+ `line` mediumint(8) NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT 'normal',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `desc` mediumtext NOT NULL,
+ `PO` varchar(30) NOT NULL,
+ `QD` varchar(30) NOT NULL,
+ `RD` varchar(30) NOT NULL,
+ `feedback` varchar(30) NOT NULL,
+ `acl` enum('open','private','custom') NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `reviewer` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `createdVersion` varchar(20) NOT NULL,
+ `order` mediumint(8) unsigned NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `acl` (`acl`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_productplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `parent` mediumint(9) NOT NULL DEFAULT '0',
+ `title` varchar(90) NOT NULL,
+ `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
+ `desc` mediumtext NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `order` text NOT NULL,
+ `closedReason` varchar(20) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `end` (`end`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programactivity` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `process` mediumint(8) NOT NULL,
+ `activity` mediumint(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `content` text NOT NULL,
+ `reason` varchar(255) NOT NULL,
+ `result` char(30) NOT NULL,
+ `linkedBy` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programoutput` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `process` mediumint(8) NOT NULL,
+ `activity` mediumint(8) NOT NULL,
+ `output` mediumint(8) NOT NULL,
+ `content` text NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `reason` varchar(255) NOT NULL,
+ `result` char(30) NOT NULL,
+ `linkedBy` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programprocess` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `process` mediumint(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `type` char(30) NOT NULL,
+ `abbr` char(30) NOT NULL,
+ `desc` text NOT NULL,
+ `reason` varchar(255) NOT NULL,
+ `linkedBy` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programreport` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `template` mediumint(8) NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `params` text NOT NULL,
+ `content` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_project` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL DEFAULT '0',
+ `model` char(30) NOT NULL,
+ `type` char(30) NOT NULL DEFAULT 'sprint',
+ `lifetime` char(30) NOT NULL DEFAULT '',
+ `budget` varchar(30) NOT NULL DEFAULT '0',
+ `budgetUnit` char(30) NOT NULL DEFAULT 'CNY',
+ `attribute` varchar(30) NOT NULL DEFAULT '',
+ `percent` float unsigned NOT NULL DEFAULT '0',
+ `milestone` enum('0','1') NOT NULL DEFAULT '0',
+ `output` text NOT NULL,
+ `auth` char(30) NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` varchar(255) NOT NULL,
+ `grade` tinyint(3) unsigned NOT NULL,
+ `name` varchar(90) NOT NULL,
+ `code` varchar(45) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `realBegan` date NOT NULL,
+ `realEnd` date NOT NULL,
+ `days` smallint(5) unsigned NOT NULL,
+ `status` varchar(10) NOT NULL,
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `pri` enum('1','2','3','4') NOT NULL DEFAULT '1',
+ `desc` mediumtext NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `parentVersion` smallint(6) NOT NULL,
+ `planDuration` int(11) NOT NULL,
+ `realDuration` int(11) NOT NULL,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `openedVersion` varchar(20) NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `canceledBy` varchar(30) NOT NULL DEFAULT '',
+ `canceledDate` datetime NOT NULL,
+ `suspendedDate` date NOT NULL,
+ `PO` varchar(30) NOT NULL DEFAULT '',
+ `PM` varchar(30) NOT NULL DEFAULT '',
+ `QD` varchar(30) NOT NULL DEFAULT '',
+ `RD` varchar(30) NOT NULL DEFAULT '',
+ `team` varchar(90) NOT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `order` mediumint(8) unsigned NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `displayCards` smallint(6) NOT NULL DEFAULT '0',
+ `fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `begin` (`begin`),
+ KEY `end` (`end`),
+ KEY `status` (`status`),
+ KEY `acl` (`acl`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectadmin` (
+ `group` smallint(6) NOT NULL,
+ `account` char(30) NOT NULL,
+ `programs` text NOT NULL,
+ `projects` text NOT NULL,
+ `products` text NOT NULL,
+ `executions` text NOT NULL,
+ UNIQUE KEY `group_account` (`group`, `account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectcase` (
+ `project` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `case` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `count` mediumint(8) unsigned NOT NULL DEFAULT '1',
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `order` smallint(6) unsigned NOT NULL,
+ UNIQUE KEY `project` (`project`,`case`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectproduct` (
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `plan` varchar(255) NOT NULL,
+ PRIMARY KEY (`project`,`product`,`branch`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectspec` (
+ `project` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `milestone` enum('0','1') NOT NULL DEFAULT '0',
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ UNIQUE KEY `project` (`project`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectstory` (
+ `project` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `product` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `order` smallint(6) unsigned NOT NULL,
+ UNIQUE KEY `project` (`project`,`story`),
+ KEY `story` (`story`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_relation` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL,
+ `product` mediumint(8) NOT NULL,
+ `execution` mediumint(8) NOT NULL,
+ `AType` char(30) NOT NULL,
+ `AID` mediumint(8) NOT NULL,
+ `AVersion` char(30) NOT NULL,
+ `relation` char(30) NOT NULL,
+ `BType` char(30) NOT NULL,
+ `BID` mediumint(8) NOT NULL,
+ `BVersion` char(30) NOT NULL,
+ `extra` char(30) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`,`AID`,`BID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_relationoftasks` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `pretask` mediumint(8) unsigned NOT NULL,
+ `condition` enum('begin','end') NOT NULL,
+ `task` mediumint(8) unsigned NOT NULL,
+ `action` enum('begin','end') NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `relationoftasks` (`execution`,`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_release` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `build` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `marker` enum('0','1') NOT NULL DEFAULT '0',
+ `date` date NOT NULL,
+ `stories` text NOT NULL,
+ `bugs` text NOT NULL,
+ `leftBugs` text NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `mailto` text,
+ `notify` varchar(255) DEFAULT NULL,
+ `status` varchar(20) NOT NULL DEFAULT 'normal',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `build` (`build`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repo` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `product` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `path` varchar(255) NOT NULL,
+ `prefix` varchar(100) NOT NULL,
+ `encoding` varchar(20) NOT NULL,
+ `SCM` varchar(10) NOT NULL,
+ `client` varchar(100) NOT NULL,
+ `serviceHost` varchar(50) NOT NULL,
+ `serviceProject` varchar(100) NOT NULL,
+ `commits` mediumint(8) unsigned NOT NULL,
+ `account` varchar(30) NOT NULL,
+ `password` varchar(30) NOT NULL,
+ `encrypt` varchar(30) NOT NULL DEFAULT 'plain',
+ `acl` text NOT NULL,
+ `synced` tinyint(1) NOT NULL DEFAULT '0',
+ `lastSync` datetime NOT NULL,
+ `desc` text NOT NULL,
+ `extra` char(30) NOT NULL,
+ `preMerge` enum('0','1') NOT NULL DEFAULT '0',
+ `job` mediumint(8) unsigned NOT NULL,
+ `fileServerUrl` text,
+ `fileServerAccount` varchar(40) NOT NULL DEFAULT '',
+ `fileServerPassword` varchar(100) NOT NULL DEFAULT '',
+ `deleted` tinyint(1) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repobranch` (
+ `repo` mediumint(8) unsigned NOT NULL,
+ `revision` mediumint(8) unsigned NOT NULL,
+ `branch` varchar(255) NOT NULL,
+ UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`),
+ KEY `branch` (`branch`),
+ KEY `revision` (`revision`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repofiles` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `revision` mediumint(8) unsigned NOT NULL,
+ `path` varchar(255) NOT NULL,
+ `parent` varchar(255) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `action` char(1) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `path` (`path`),
+ KEY `parent` (`parent`),
+ KEY `repo` (`repo`),
+ KEY `revision` (`revision`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repohistory` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `repo` mediumint(9) NOT NULL,
+ `revision` varchar(40) NOT NULL,
+ `commit` mediumint(8) unsigned NOT NULL,
+ `comment` text NOT NULL,
+ `committer` varchar(100) NOT NULL,
+ `time` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `repo` (`repo`),
+ KEY `revision` (`revision`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_report` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `code` varchar(100) NOT NULL,
+ `name` text NOT NULL,
+ `module` varchar(100) NOT NULL,
+ `sql` text NOT NULL,
+ `vars` text NOT NULL,
+ `langs` text NOT NULL,
+ `params` text NOT NULL,
+ `step` tinyint(1) NOT NULL DEFAULT '2',
+ `desc` text NOT NULL,
+ `addedBy` char(30) NOT NULL,
+ `addedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`)
+) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_researchplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `customer` varchar(255) NOT NULL,
+ `stakeholder` varchar(255) NOT NULL,
+ `objective` varchar(255) NOT NULL,
+ `begin` datetime NOT NULL,
+ `end` datetime NOT NULL,
+ `location` varchar(255) NOT NULL,
+ `team` varchar(255) NOT NULL,
+ `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL,
+ `outline` mediumtext NOT NULL,
+ `schedule` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_researchreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `relatedPlan` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `author` varchar(30) NOT NULL,
+ `content` mediumtext NOT NULL,
+ `customer` varchar(255) NOT NULL,
+ `researchObjects` varchar(255) NOT NULL,
+ `begin` datetime NOT NULL,
+ `end` datetime NOT NULL,
+ `location` varchar(255) NOT NULL,
+ `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_review` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `object` mediumint(8) NOT NULL,
+ `template` mediumint(8) NOT NULL,
+ `doc` mediumint(8) DEFAULT NULL,
+ `docVersion` smallint(6) NOT NULL,
+ `status` char(30) NOT NULL,
+ `reviewedBy` varchar(255) NOT NULL,
+ `auditedBy` varchar(255) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deadline` date NOT NULL,
+ `lastReviewedBy` varchar(255) DEFAULT NULL,
+ `lastReviewedDate` date NOT NULL,
+ `lastAuditedBy` varchar(255) NOT NULL,
+ `lastAuditedDate` date NOT NULL,
+ `lastEditedBy` varchar(255) NOT NULL,
+ `lastEditedDate` date NOT NULL,
+ `result` char(30) NOT NULL,
+ `auditResult` char(30) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewcl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `title` varchar(255) NOT NULL,
+ `object` char(30) NOT NULL,
+ `category` char(30) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `order` mediumint(8) DEFAULT '0',
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewissue` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `review` mediumint(8) NOT NULL,
+ `approval` mediumint(8) NOT NULL,
+ `injection` mediumint(8) NOT NULL,
+ `identify` mediumint(8) NOT NULL,
+ `type` char(30) NOT NULL DEFAULT 'review',
+ `listID` mediumint(8) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `opinion` varchar(255) NOT NULL,
+ `opinionDate` date NOT NULL,
+ `status` char(30) NOT NULL,
+ `resolution` char(30) NOT NULL,
+ `resolutionBy` char(30) NOT NULL,
+ `resolutionDate` date NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewlist` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `title` varchar(255) NOT NULL,
+ `object` char(30) NOT NULL,
+ `category` char(30) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewresult` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `review` mediumint(8) NOT NULL,
+ `type` char(30) NOT NULL DEFAULT 'review',
+ `result` char(30) NOT NULL,
+ `opinion` text NOT NULL,
+ `reviewer` char(30) NOT NULL,
+ `remainIssue` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `consumed` float NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `reviewer` (`review`,`reviewer`,`type`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_risk` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` varchar(255) NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `source` char(30) NOT NULL,
+ `category` char(30) NOT NULL,
+ `strategy` char(30) NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT 'active',
+ `impact` char(30) NOT NULL,
+ `probability` char(30) NOT NULL,
+ `rate` char(30) NOT NULL,
+ `pri` char(30) NOT NULL,
+ `identifiedDate` date NOT NULL,
+ `prevention` mediumtext NOT NULL,
+ `remedy` mediumtext NOT NULL,
+ `plannedClosedDate` date NOT NULL,
+ `actualClosedDate` date NOT NULL,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `from` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `resolution` mediumtext NOT NULL,
+ `resolvedBy` varchar(30) NOT NULL,
+ `activateBy` varchar(30) NOT NULL,
+ `activateDate` date NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` date NOT NULL,
+ `cancelBy` varchar(30) NOT NULL,
+ `cancelDate` date NOT NULL,
+ `cancelReason` char(30) NOT NULL,
+ `hangupBy` varchar(30) NOT NULL,
+ `hangupDate` date NOT NULL,
+ `trackedBy` varchar(30) NOT NULL,
+ `trackedDate` date NOT NULL,
+ `assignedDate` date NOT NULL,
+ `approvedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_riskissue` (
+ `risk` mediumint(8) unsigned NOT NULL,
+ `issue` mediumint(8) unsigned NOT NULL,
+ UNIQUE KEY `risk_issue` (`risk`,`issue`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_score` (
+ `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
+ `account` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `method` varchar(30) NOT NULL,
+ `desc` varchar(250) NOT NULL DEFAULT '',
+ `before` int(11) NOT NULL DEFAULT '0',
+ `score` int(11) NOT NULL DEFAULT '0',
+ `after` int(11) NOT NULL DEFAULT '0',
+ `time` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `model` (`module`),
+ KEY `method` (`method`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_searchdict` (
+ `key` smallint(5) unsigned NOT NULL,
+ `value` char(3) NOT NULL,
+ PRIMARY KEY (`key`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_searchindex` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `objectType` char(20) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `title` text NOT NULL,
+ `content` text NOT NULL,
+ `addedDate` datetime NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `object` (`objectType`,`objectID`),
+ KEY `addedDate` (`addedDate`),
+ FULLTEXT KEY `content` (`content`),
+ FULLTEXT KEY `title` (`title`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_serverroom` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(128) NOT NULL,
+ `city` varchar(128) NOT NULL,
+ `line` varchar(20) NOT NULL,
+ `bandwidth` varchar(128) NOT NULL,
+ `provider` varchar(128) NOT NULL,
+ `owner` varchar(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_service` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `external` enum('0','1') NOT NULL DEFAULT '0',
+ `port` smallint(5) unsigned NOT NULL,
+ `entry` varchar(255) NOT NULL,
+ `deploy` varchar(255) NOT NULL,
+ `version` varchar(64) NOT NULL,
+ `color` char(7) NOT NULL,
+ `desc` mediumtext,
+ `dept` varchar(128) NOT NULL,
+ `devel` varchar(30) NOT NULL,
+ `qa` varchar(30) NOT NULL,
+ `ops` varchar(30) NOT NULL,
+ `hosts` text,
+ `softName` varchar(128) NOT NULL,
+ `softVersion` varchar(128) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `order` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_solutions` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `contents` text NOT NULL COMMENT '问题描述',
+ `support` text NOT NULL COMMENT '是否需要高层支持',
+ `measures` text NOT NULL COMMENT '解决建议',
+ `type` char(30) NOT NULL,
+ `addedBy` varchar(30) NOT NULL,
+ `addedDate` date NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_sqlview` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(90) NOT NULL,
+ `code` varchar(45) NOT NULL,
+ `sql` text NOT NULL,
+ `desc` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_stage` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `percent` varchar(255) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_stakeholder` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `objectID` mediumint(8) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `user` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `key` enum('0','1') NOT NULL,
+ `from` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ KEY `objectID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_story` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `parent` mediumint(9) NOT NULL DEFAULT '0',
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `module` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `plan` text,
+ `source` varchar(20) NOT NULL,
+ `sourceNote` varchar(255) NOT NULL,
+ `fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `title` varchar(255) NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT 'story',
+ `category` varchar(30) NOT NULL DEFAULT 'feature',
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT '3',
+ `estimate` float unsigned NOT NULL,
+ `status` enum('','changing','active','draft','closed','reviewing') NOT NULL DEFAULT '',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released','closed') NOT NULL DEFAULT 'wait',
+ `stagedBy` char(30) NOT NULL,
+ `mailto` text,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `fromStory` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `fromVersion` smallint(6) NOT NULL DEFAULT '1',
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime NOT NULL,
+ `approvedDate` date NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `changedBy` VARCHAR(30) NOT NULL,
+ `changedDate` DATETIME NOT NULL,
+ `reviewedBy` varchar(255) NOT NULL,
+ `reviewedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `closedReason` varchar(30) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `toBug` mediumint(8) unsigned NOT NULL,
+ `childStories` varchar(255) NOT NULL,
+ `linkStories` varchar(255) NOT NULL,
+ `linkRequirements` varchar(255) NOT NULL,
+ `duplicateStory` mediumint(8) unsigned NOT NULL,
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `storyChanged` enum('0','1') NOT NULL DEFAULT '0',
+ `feedbackBy` varchar(100) NOT NULL,
+ `notifyEmail` varchar(100) NOT NULL,
+ `URChanged` enum('0','1') NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `status` (`status`),
+ KEY `assignedTo` (`assignedTo`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyestimate` (
+ `story` mediumint(9) NOT NULL,
+ `round` smallint(6) NOT NULL,
+ `estimate` text NOT NULL,
+ `average` float NOT NULL,
+ `openedBy` varchar(30) NOT NULL,
+ `openedDate` datetime NOT NULL,
+ UNIQUE KEY `story` (`story`,`round`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyreview` (
+ `story` mediumint(9) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `reviewer` varchar(30) NOT NULL,
+ `result` varchar(30) NOT NULL,
+ `reviewDate` datetime NOT NULL,
+ UNIQUE KEY `story` (`story`,`version`,`reviewer`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyspec` (
+ `story` mediumint(9) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `spec` mediumtext NOT NULL,
+ `verify` mediumtext NOT NULL,
+ `files` text NOT NULL,
+ UNIQUE KEY `story` (`story`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storystage` (
+ `story` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `stage` varchar(50) NOT NULL,
+ `stagedBy` char(30) NOT NULL,
+ UNIQUE KEY `story_branch` (`story`,`branch`),
+ KEY `story` (`story`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_suitecase` (
+ `suite` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `case` mediumint(8) unsigned NOT NULL,
+ `version` smallint(5) unsigned NOT NULL,
+ UNIQUE KEY `suitecase` (`suite`,`case`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_task` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `parent` mediumint(8) NOT NULL DEFAULT '0',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `module` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `design` mediumint(8) unsigned NOT NULL,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `storyVersion` smallint(6) NOT NULL DEFAULT '1',
+ `designVersion` smallint(6) unsigned NOT NULL,
+ `fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `fromIssue` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `feedback` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `mode` varchar(10) NOT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `estimate` float unsigned NOT NULL,
+ `consumed` float unsigned NOT NULL,
+ `left` float unsigned NOT NULL,
+ `deadline` date NOT NULL,
+ `status` enum('wait','doing','done','pause','cancel','closed') NOT NULL DEFAULT 'wait',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `mailto` text,
+ `desc` mediumtext NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `openedBy` varchar(30) NOT NULL,
+ `openedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `estStarted` date NOT NULL,
+ `realStarted` datetime NOT NULL,
+ `finishedBy` varchar(30) NOT NULL,
+ `finishedDate` datetime NOT NULL,
+ `finishedList` text NOT NULL,
+ `canceledBy` varchar(30) NOT NULL,
+ `canceledDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `planDuration` int(11) NOT NULL,
+ `realDuration` int(11) NOT NULL,
+ `closedReason` varchar(30) NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `mr` mediumint(8) unsigned NOT NULL,
+ `entry` varchar(255) NOT NULL,
+ `lines` varchar(10) NOT NULL,
+ `v1` varchar(40) NOT NULL,
+ `v2` varchar(40) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ KEY `execution` (`execution`),
+ KEY `story` (`story`),
+ KEY `parent` (`parent`),
+ KEY `assignedTo` (`assignedTo`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_taskestimate` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `date` date NOT NULL,
+ `left` float unsigned NOT NULL DEFAULT '0',
+ `consumed` float unsigned NOT NULL,
+ `account` char(30) NOT NULL DEFAULT '',
+ `work` text,
+ `order` tinyint unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `task` (`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_taskspec` (
+ `task` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `estStarted` date NOT NULL,
+ `deadline` date NOT NULL,
+ UNIQUE KEY `task` (`task`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_taskteam` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `task` mediumint(8) unsigned NOT NULL,
+ `account` char(30) NOT NULL,
+ `estimate` decimal(12,2) NOT NULL,
+ `consumed` decimal(12,2) NOT NULL,
+ `left` decimal(12,2) NOT NULL,
+ `transfer` char(30) NOT NULL,
+ `status` enum('wait','doing','done') NOT NULL DEFAULT 'wait',
+ `order` tinyint(3) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `task` (`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_team` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `root` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `type` enum('project','task','execution') NOT NULL DEFAULT 'project',
+ `account` char(30) NOT NULL DEFAULT '',
+ `role` char(30) NOT NULL DEFAULT '',
+ `position` varchar(30) NOT NULL,
+ `limited` char(8) NOT NULL DEFAULT 'no',
+ `join` date NOT NULL DEFAULT '0000-00-00',
+ `days` smallint(5) unsigned NOT NULL,
+ `hours` float(3,1) unsigned NOT NULL DEFAULT '0.0',
+ `estimate` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
+ `consumed` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
+ `left` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
+ `order` tinyint(3) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `team` (`root`,`type`,`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `tasks` varchar(255) NOT NULL,
+ `builds` varchar(255) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `owner` char(30) NOT NULL,
+ `members` text NOT NULL,
+ `stories` text NOT NULL,
+ `bugs` text NOT NULL,
+ `cases` text NOT NULL,
+ `report` text NOT NULL,
+ `objectType` varchar(20) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testresult` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `run` mediumint(8) unsigned NOT NULL,
+ `case` mediumint(8) unsigned NOT NULL,
+ `version` smallint(5) unsigned NOT NULL,
+ `job` mediumint(8) unsigned NOT NULL,
+ `compile` mediumint(8) unsigned NOT NULL,
+ `caseResult` char(30) NOT NULL,
+ `stepResults` text NOT NULL,
+ `lastRunner` varchar(30) NOT NULL,
+ `date` datetime NOT NULL,
+ `duration` float NOT NULL,
+ `xml` text NOT NULL,
+ `deploy` mediumint(8) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `case` (`case`),
+ KEY `version` (`version`),
+ KEY `run` (`run`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testrun` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `case` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `assignedTo` char(30) NOT NULL DEFAULT '',
+ `lastRunner` varchar(30) NOT NULL,
+ `lastRunDate` datetime NOT NULL,
+ `lastRunResult` char(30) NOT NULL,
+ `status` char(30) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `task` (`task`,`case`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testsuite` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `order` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `addedBy` char(30) NOT NULL,
+ `addedDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testtask` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `name` char(90) NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `build` char(30) NOT NULL,
+ `type` varchar(255) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `realFinishedDate` datetime NOT NULL,
+ `mailto` text,
+ `desc` mediumtext NOT NULL,
+ `report` text NOT NULL,
+ `status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait',
+ `testreport` mediumint(8) unsigned NOT NULL,
+ `auto` varchar(10) NOT NULL DEFAULT 'no',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `build` (`build`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_todo` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `date` date NOT NULL,
+ `begin` smallint(4) unsigned zerofill NOT NULL,
+ `end` smallint(4) unsigned zerofill NOT NULL,
+ `feedback` mediumint(8) unsigned NOT NULL,
+ `type` char(15) NOT NULL,
+ `cycle` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `idvalue` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `pri` tinyint(3) unsigned NOT NULL,
+ `name` char(150) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
+ `private` tinyint(1) NOT NULL,
+ `config` varchar(255) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime NOT NULL,
+ `finishedBy` varchar(30) NOT NULL DEFAULT '',
+ `finishedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `assignedTo` (`assignedTo`),
+ KEY `finishedBy` (`finishedBy`),
+ KEY `date` (`date`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_traincategory` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(30) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) NOT NULL,
+ `order` mediumint(8) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `path` (`path`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_traincontents` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `code` varchar(50) NOT NULL,
+ `course` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `name` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `desc` text NOT NULL,
+ `order` mediumint(8) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` tinyint(1) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_traincourse` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `code` varchar(50) NOT NULL,
+ `category` mediumint(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `status` varchar(10) NOT NULL,
+ `teacher` varchar(30) NOT NULL DEFAULT '',
+ `desc` mediumtext NOT NULL,
+ `createdBy` varchar(255) NOT NULL,
+ `createdDate` date NOT NULL,
+ `editedBy` varchar(255) NOT NULL,
+ `editedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_trainplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `place` varchar(255) NOT NULL,
+ `trainee` text NOT NULL,
+ `lecturer` varchar(20) NOT NULL,
+ `type` enum('inside','outside') NOT NULL DEFAULT 'inside',
+ `status` varchar(20) NOT NULL,
+ `summary` mediumtext NOT NULL,
+ `createdBy` char(30) DEFAULT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_trainrecords` (
+ `user` char(30) NOT NULL,
+ `objectId` mediumint(8) unsigned NOT NULL,
+ `objectType` varchar(10) NOT NULL,
+ `status` varchar(10) NOT NULL,
+ PRIMARY KEY (`user`,`objectId`,`objectType`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_trip` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` enum('trip','egress') NOT NULL DEFAULT 'trip',
+ `customers` varchar(20) NOT NULL,
+ `name` char(30) NOT NULL,
+ `desc` text NOT NULL,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `start` time NOT NULL,
+ `finish` time NOT NULL,
+ `from` char(50) NOT NULL,
+ `to` char(50) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_user` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `company` mediumint(8) unsigned NOT NULL,
+ `type` char(30) NOT NULL DEFAULT 'inside',
+ `dept` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `account` char(30) NOT NULL DEFAULT '',
+ `password` char(32) NOT NULL DEFAULT '',
+ `role` char(10) NOT NULL DEFAULT '',
+ `realname` varchar(100) NOT NULL DEFAULT '',
+ `pinyin` varchar(255) NOT NULL DEFAULT '',
+ `nickname` char(60) NOT NULL DEFAULT '',
+ `commiter` varchar(100) NOT NULL,
+ `avatar` text NOT NULL,
+ `birthday` date NOT NULL DEFAULT '0000-00-00',
+ `gender` enum('f','m') NOT NULL DEFAULT 'f',
+ `email` char(90) NOT NULL DEFAULT '',
+ `skype` char(90) NOT NULL DEFAULT '',
+ `qq` char(20) NOT NULL DEFAULT '',
+ `mobile` char(11) NOT NULL DEFAULT '',
+ `phone` char(20) NOT NULL DEFAULT '',
+ `weixin` varchar(90) NOT NULL DEFAULT '',
+ `dingding` varchar(90) NOT NULL DEFAULT '',
+ `slack` varchar(90) NOT NULL DEFAULT '',
+ `whatsapp` varchar(90) NOT NULL DEFAULT '',
+ `address` char(120) NOT NULL DEFAULT '',
+ `zipcode` char(10) NOT NULL DEFAULT '',
+ `nature` text NOT NULL,
+ `analysis` text NOT NULL,
+ `strategy` text NOT NULL,
+ `join` date NOT NULL DEFAULT '0000-00-00',
+ `visits` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite',
+ `ip` char(15) NOT NULL DEFAULT '',
+ `last` int(10) unsigned NOT NULL DEFAULT '0',
+ `fails` tinyint(5) NOT NULL DEFAULT '0',
+ `locked` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `feedback` enum('0','1') NOT NULL DEFAULT '0',
+ `ranzhi` char(30) NOT NULL DEFAULT '',
+ `ldap` char(30) NOT NULL,
+ `score` int(11) NOT NULL DEFAULT '0',
+ `scoreLevel` int(11) NOT NULL DEFAULT '0',
+ `resetToken` varchar(50) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `clientStatus` enum('online','away','busy','offline','meeting') NOT NULL DEFAULT 'offline',
+ `clientLang` varchar(10) NOT NULL DEFAULT 'zh-cn',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `account` (`account`),
+ KEY `dept` (`dept`),
+ KEY `email` (`email`),
+ KEY `commiter` (`commiter`),
+ KEY `deleted` (`deleted`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usercontact` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `listName` varchar(60) NOT NULL,
+ `userList` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usergroup` (
+ `account` char(30) NOT NULL DEFAULT '',
+ `group` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `project` text NOT NULL,
+ UNIQUE KEY `account` (`account`,`group`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_userquery` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `title` varchar(90) NOT NULL,
+ `form` text NOT NULL,
+ `sql` text NOT NULL,
+ `shortcut` enum('0','1') NOT NULL DEFAULT '0',
+ `common` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `module` (`module`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usertpl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `title` varchar(150) NOT NULL,
+ `content` text NOT NULL,
+ `public` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_userview` (
+ `account` char(30) NOT NULL,
+ `programs` mediumtext NOT NULL,
+ `products` mediumtext NOT NULL,
+ `projects` mediumtext NOT NULL,
+ `sprints` mediumtext NOT NULL,
+ UNIQUE KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_vm` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `hostID` int(10) unsigned NOT NULL DEFAULT '0',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `osCategory` varchar(50) NOT NULL DEFAULT '',
+ `osType` varchar(50) NOT NULL DEFAULT '',
+ `osArch` varchar(50) NOT NULL DEFAULT '',
+ `osLang` varchar(50) NOT NULL DEFAULT '',
+ `osCpu` tinyint(2) NOT NULL DEFAULT 0,
+ `osMemory` smallint(6) NOT NULL DEFAULT 0,
+ `osDisk` smallint(6) NOT NULL DEFAULT 0,
+ `status` varchar(50) NOT NULL DEFAULT '',
+ `destroyAt` datetime DEFAULT NULL,
+ `macAddress` varchar(255) NOT NULL DEFAULT '',
+ `workspace` varchar(255) NOT NULL DEFAULT '',
+ `templateID` int(10) unsigned NOT NULL DEFAULT '0',
+ `baseImageID` int(10) unsigned NOT NULL DEFAULT '0',
+ `baseImagePath` varchar(255) NOT NULL DEFAULT '',
+ `desc` varchar(255) NOT NULL DEFAULT '',
+ `heatbeat` datetime DEFAULT NULL,
+ `vncPort` int(10) NOT NULL DEFAULT 0,
+ `instance` varchar(255) NOT NULL DEFAULT '',
+ `eip` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `public` varchar(50) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_vmtemplate` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `hostID` int(10) unsigned NOT NULL DEFAULT '0',
+ `templateName` varchar(255) NOT NULL DEFAULT '',
+ `osType` varchar(50) NOT NULL DEFAULT '',
+ `osCategory` varchar(50) NOT NULL DEFAULT '',
+ `osVersion` varchar(50) NOT NULL DEFAULT '',
+ `osLang` varchar(50) NOT NULL,
+ `cpuCoreNum` smallint(4) NOT NULL DEFAULT 0,
+ `memorySize` int NOT NULL DEFAULT 0,
+ `diskSize` int NOT NULL DEFAULT 0,
+ `osArch` varchar(50) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_webhook` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(15) NOT NULL DEFAULT 'default',
+ `name` varchar(50) NOT NULL,
+ `url` varchar(255) NOT NULL,
+ `domain` varchar(255) NOT NULL,
+ `secret` varchar(255) NOT NULL,
+ `contentType` varchar(30) NOT NULL DEFAULT 'application/json',
+ `sendType` enum('sync','async') NOT NULL DEFAULT 'sync',
+ `products` text NOT NULL,
+ `executions` text NOT NULL,
+ `params` varchar(100) NOT NULL,
+ `actions` text NOT NULL,
+ `desc` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_weeklyreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `weekStart` date NOT NULL,
+ `pv` float(9,2) NOT NULL,
+ `ev` float(9,2) NOT NULL,
+ `ac` float(9,2) NOT NULL,
+ `sv` float(9,2) NOT NULL,
+ `cv` float(9,2) NOT NULL,
+ `staff` smallint(5) unsigned NOT NULL,
+ `progress` varchar(255) NOT NULL,
+ `workload` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `week` (`project`,`weekStart`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workestimation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `scale` decimal(10,2) unsigned NOT NULL,
+ `productivity` decimal(10,2) unsigned NOT NULL,
+ `duration` decimal(10,2) unsigned NOT NULL,
+ `unitLaborCost` decimal(10,2) unsigned NOT NULL,
+ `totalLaborCost` decimal(10,2) unsigned NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `dayHour` decimal(10,2) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflow` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `parent` varchar(30) NOT NULL,
+ `child` varchar(30) NOT NULL,
+ `type` varchar(10) NOT NULL DEFAULT 'flow',
+ `navigator` varchar(10) NOT NULL,
+ `app` varchar(20) NOT NULL,
+ `position` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `table` varchar(50) NOT NULL,
+ `name` varchar(30) NOT NULL,
+ `titleField` varchar(30) NOT NULL,
+ `contentField` text NOT NULL,
+ `flowchart` text NOT NULL,
+ `js` text NOT NULL,
+ `css` text NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ `buildin` tinyint(1) unsigned NOT NULL,
+ `administrator` text NOT NULL,
+ `desc` text NOT NULL,
+ `version` varchar(10) NOT NULL DEFAULT '1.0',
+ `status` varchar(10) NOT NULL DEFAULT 'wait',
+ `approval` enum('enabled', 'disabled') NOT NULL DEFAULT 'disabled',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`app`,`module`,`vision`),
+ KEY `type` (`type`),
+ KEY `app` (`app`),
+ KEY `module` (`module`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowaction` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `action` varchar(50) NOT NULL,
+ `method` varchar(50) NOT NULL,
+ `name` varchar(50) NOT NULL,
+ `type` enum('single','batch') NOT NULL DEFAULT 'single',
+ `batchMode` enum('same','different') NOT NULL DEFAULT 'different',
+ `extensionType` varchar(10) NOT NULL DEFAULT 'override' COMMENT 'none | extend | override',
+ `open` varchar(20) NOT NULL,
+ `position` enum('menu','browseandview','browse','view') NOT NULL DEFAULT 'browseandview',
+ `layout` char(20) NOT NULL,
+ `show` enum('dropdownlist','direct') NOT NULL DEFAULT 'dropdownlist',
+ `order` smallint(5) unsigned NOT NULL,
+ `buildin` tinyint(1) unsigned NOT NULL,
+ `role` varchar(10) NOT NULL DEFAULT 'custom',
+ `virtual` tinyint(1) unsigned NOT NULL,
+ `conditions` text NOT NULL,
+ `verifications` text NOT NULL,
+ `hooks` text NOT NULL,
+ `linkages` text NOT NULL,
+ `js` text NOT NULL,
+ `css` text NOT NULL,
+ `toList` char(255) NOT NULL,
+ `blocks` text NOT NULL,
+ `desc` text NOT NULL,
+ `status` varchar(10) NOT NULL DEFAULT 'enable',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`module`,`action`,`vision`),
+ KEY `module` (`module`),
+ KEY `action` (`action`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB AUTO_INCREMENT=190 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowdatasource` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` enum('system','sql','func','option','lang','category') NOT NULL DEFAULT 'option',
+ `name` varchar(30) NOT NULL,
+ `code` varchar(30) NOT NULL,
+ `datasource` text NOT NULL,
+ `view` varchar(20) NOT NULL,
+ `keyField` varchar(50) NOT NULL,
+ `valueField` varchar(50) NOT NULL,
+ `buildin` tinyint(1) unsigned NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `type` (`type`)
+) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowfield` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `field` varchar(50) NOT NULL,
+ `type` varchar(20) NOT NULL DEFAULT 'varchar',
+ `length` varchar(10) NOT NULL,
+ `name` varchar(50) NOT NULL,
+ `control` varchar(20) NOT NULL,
+ `expression` text NOT NULL,
+ `options` text NOT NULL,
+ `default` varchar(100) NOT NULL,
+ `rules` varchar(255) NOT NULL,
+ `placeholder` varchar(100) NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ `searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `exportOrder` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `canExport` enum('0','1') NOT NULL DEFAULT '0',
+ `canSearch` enum('0','1') NOT NULL DEFAULT '0',
+ `isValue` enum('0','1') NOT NULL DEFAULT '0',
+ `readonly` enum('0','1') NOT NULL DEFAULT '0',
+ `buildin` tinyint(1) unsigned NOT NULL,
+ `role` varchar(10) NOT NULL DEFAULT 'custom',
+ `desc` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`module`,`field`),
+ KEY `module` (`module`),
+ KEY `field` (`field`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB AUTO_INCREMENT=360 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowlabel` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `action` varchar(30) NOT NULL DEFAULT 'browse',
+ `code` varchar(30) NOT NULL,
+ `label` varchar(255) NOT NULL,
+ `params` text NOT NULL,
+ `orderBy` text NOT NULL,
+ `order` tinyint(3) NOT NULL,
+ `buildin` tinyint(1) unsigned NOT NULL,
+ `role` varchar(10) NOT NULL DEFAULT 'custom',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `module` (`module`)
+) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowlayout` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `action` varchar(50) NOT NULL,
+ `field` varchar(50) NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ `width` smallint(5) NOT NULL,
+ `position` text NOT NULL,
+ `readonly` enum('0','1') NOT NULL DEFAULT '0',
+ `mobileShow` enum('0','1') NOT NULL DEFAULT '1',
+ `summary` varchar(20) NOT NULL,
+ `defaultValue` text NOT NULL,
+ `layoutRules` varchar(255) NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`module`,`action`,`field`,`vision`),
+ KEY `module` (`module`),
+ KEY `action` (`action`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowlinkdata` (
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `linkedType` varchar(30) NOT NULL,
+ `linkedID` mediumint(8) unsigned NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ UNIQUE KEY `unique` (`objectType`,`objectID`,`linkedType`,`linkedID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowrelation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `prev` varchar(30) NOT NULL,
+ `next` varchar(30) NOT NULL,
+ `field` varchar(50) NOT NULL,
+ `actions` varchar(20) NOT NULL,
+ `actionCodes` text NOT NULL,
+ `buildin` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowrelationlayout` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `prev` varchar(30) NOT NULL,
+ `next` varchar(30) NOT NULL,
+ `action` varchar(50) NOT NULL,
+ `field` varchar(50) NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`prev`,`next`,`action`,`field`),
+ KEY `prev` (`prev`),
+ KEY `next` (`next`),
+ KEY `action` (`action`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL COMMENT 'module name',
+ `name` varchar(100) NOT NULL COMMENT 'report name',
+ `type` enum('pie','line','bar') NOT NULL DEFAULT 'pie' COMMENT 'report type',
+ `countType` enum('sum','count') NOT NULL DEFAULT 'sum' COMMENT 'report count method',
+ `displayType` enum('value','percent') NOT NULL DEFAULT 'value' COMMENT 'report display method',
+ `dimension` varchar(130) NOT NULL COMMENT 'dimension field code of zt_workflowfield',
+ `fields` text NOT NULL COMMENT 'count fileds code of zt_workflowfield,use comma split',
+ `order` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowrule` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` enum('system','regex','func') NOT NULL DEFAULT 'regex',
+ `name` varchar(30) NOT NULL,
+ `rule` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `type` (`type`)
+) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowsql` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `field` varchar(50) NOT NULL,
+ `action` varchar(50) NOT NULL,
+ `sql` text NOT NULL,
+ `vars` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `module` (`module`),
+ KEY `field` (`field`),
+ KEY `action` (`action`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowversion` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `version` varchar(10) NOT NULL,
+ `fields` text NOT NULL,
+ `actions` text NOT NULL,
+ `layouts` text NOT NULL,
+ `sqls` text NOT NULL,
+ `labels` text NOT NULL,
+ `table` text NOT NULL,
+ `datas` text NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `moduleversion` (`module`,`version`),
+ KEY `module` (`module`),
+ KEY `version` (`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_zoutput` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `activity` mediumint(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `content` mediumtext NOT NULL,
+ `optional` char(20) NOT NULL,
+ `tailorNorm` varchar(255) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `order` mediumint(8) DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=130 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_dayactions` AS SELECT
+ 1 AS `actions`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daybugopen` AS SELECT
+ 1 AS `bugopen`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daybugresolve` AS SELECT
+ 1 AS `bugresolve`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_dayeffort` AS SELECT
+ 1 AS `consumed`,
+ 1 AS `date`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daystoryclose` AS SELECT
+ 1 AS `storyclose`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daystoryopen` AS SELECT
+ 1 AS `storyopen`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daytaskfinish` AS SELECT
+ 1 AS `taskfinish`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daytaskopen` AS SELECT
+ 1 AS `taskopen`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_dayuserlogin` AS SELECT
+ 1 AS `userlogin`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_executionsummary` AS SELECT
+ 1 AS `execution`,
+ 1 AS `estimate`,
+ 1 AS `consumed`,
+ 1 AS `left`,
+ 1 AS `number`,
+ 1 AS `undone`,
+ 1 AS `totalReal`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_productbugs` AS SELECT
+ 1 AS `product`,
+ 1 AS `bugs`,
+ 1 AS `resolutions`,
+ 1 AS `seriousBugs`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_productstories` AS SELECT
+ 1 AS `product`,
+ 1 AS `stories`,
+ 1 AS `undone`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_projectbugs` AS SELECT
+ 1 AS `execution`,
+ 1 AS `bugs`,
+ 1 AS `resolutions`,
+ 1 AS `seriousBugs`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_projectstories` AS SELECT
+ 1 AS `execution`,
+ 1 AS `stories`,
+ 1 AS `undone`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_projectsummary` AS SELECT
+ 1 AS `project`,
+ 1 AS `estimate`,
+ 1 AS `consumed`,
+ 1 AS `left`,
+ 1 AS `number`,
+ 1 AS `undone`,
+ 1 AS `totalReal`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_projectteams` AS SELECT
+ 1 AS `execution`,
+ 1 AS `teams`*/;
+SET character_set_client = @saved_cs_client;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_10`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_10` AS select `zt_build`.`id` AS `id`,`zt_build`.`name` AS `name` from `zt_build` where (`zt_build`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_11`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_11` AS select `zt_module`.`id` AS `id`,`zt_module`.`name` AS `name` from `zt_module` where (`zt_module`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_12`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_12` AS select `zt_productplan`.`id` AS `id`,`zt_productplan`.`title` AS `title` from `zt_productplan` where (`zt_productplan`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_4`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_4` AS select `zt_story`.`id` AS `id`,`zt_story`.`title` AS `title` from `zt_story` where (`zt_story`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_41`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_41` AS select `zt_case`.`id` AS `id`,`zt_case`.`title` AS `title` from `zt_case` where (`zt_case`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_46`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_46` AS select `zt_task`.`id` AS `id`,`zt_task`.`name` AS `name` from `zt_task` where ((`zt_task`.`deleted` = '0') and (`zt_task`.`vision` = 'lite')) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_5`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_5` AS select `zt_task`.`id` AS `id`,`zt_task`.`name` AS `name` from `zt_task` where ((`zt_task`.`deleted` = '0') and (`zt_task`.`vision` = 'rnd')) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_6`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_6` AS select `zt_bug`.`id` AS `id`,`zt_bug`.`title` AS `title` from `zt_bug` where (`zt_bug`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_dayactions`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_dayactions` AS select count(0) AS `actions`,left(`zt_action`.`date`,10) AS `day` from `zt_action` group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daybugopen`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daybugopen` AS select count(0) AS `bugopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'bug') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daybugresolve`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daybugresolve` AS select count(0) AS `bugresolve`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'bug') and (`zt_action`.`action` = 'resolved')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_dayeffort`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_dayeffort` AS select round(sum(`zt_effort`.`consumed`),1) AS `consumed`,`zt_effort`.`date` AS `date` from `zt_effort` group by `zt_effort`.`date` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daystoryclose`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daystoryclose` AS select count(0) AS `storyclose`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'story') and (`zt_action`.`action` = 'closed')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daystoryopen`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daystoryopen` AS select count(0) AS `storyopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'story') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daytaskfinish`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daytaskfinish` AS select count(0) AS `taskfinish`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'task') and (`zt_action`.`action` = 'finished')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daytaskopen`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daytaskopen` AS select count(0) AS `taskopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'task') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_dayuserlogin`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_dayuserlogin` AS select count(0) AS `userlogin`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'user') and (`zt_action`.`action` = 'login')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_executionsummary`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_executionsummary` AS select `zt_task`.`execution` AS `execution`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`execution` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_productbugs`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_productbugs` AS select `zt_bug`.`product` AS `product`,count(0) AS `bugs`,sum(if((`zt_bug`.`resolution` = ''),0,1)) AS `resolutions`,sum(if((`zt_bug`.`severity` <= 2),1,0)) AS `seriousBugs` from `zt_bug` where (`zt_bug`.`deleted` = '0') group by `zt_bug`.`product` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_productstories`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_productstories` AS select `zt_story`.`product` AS `product`,count('*') AS `stories`,sum(if((`zt_story`.`status` = 'closed'),0,1)) AS `undone` from `zt_story` where (`zt_story`.`deleted` = '0') group by `zt_story`.`product` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_projectbugs`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_projectbugs` AS select `zt_bug`.`execution` AS `execution`,count(0) AS `bugs`,sum(if((`zt_bug`.`resolution` = ''),0,1)) AS `resolutions`,sum(if((`zt_bug`.`severity` <= 2),1,0)) AS `seriousBugs` from `zt_bug` where (`zt_bug`.`deleted` = '0') group by `zt_bug`.`execution` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_projectstories`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_projectstories` AS select `t1`.`project` AS `execution`,count('*') AS `stories`,sum(if((`t2`.`status` = 'closed'),0,1)) AS `undone` from ((`zt_projectstory` `t1` left join `zt_story` `t2` on((`t1`.`story` = `t2`.`id`))) left join `zt_project` `t3` on((`t1`.`project` = `t3`.`id`))) where ((`t2`.`deleted` = '0') and (`t3`.`type` in ('sprint','stage'))) group by `t1`.`project` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_projectsummary`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_projectsummary` AS select `zt_task`.`project` AS `project`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`project` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_projectteams`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_projectteams` AS select `zt_team`.`root` AS `execution`,count('*') AS `teams` from `zt_team` where (`zt_team`.`type` = 'execution') group by `zt_team`.`root` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
diff --git a/db/standard/zentao17.6.sql b/db/standard/zentao17.6.sql
new file mode 100644
index 0000000000..8efefe0f88
--- /dev/null
+++ b/db/standard/zentao17.6.sql
@@ -0,0 +1,3986 @@
+CREATE TABLE `zt_account` (
+ `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `provider` varchar(255) NOT NULL,
+ `adminURI` varchar(255) NOT NULL,
+ `account` varchar(255) NOT NULL,
+ `password` varchar(255) NOT NULL,
+ `email` varchar(255) NOT NULL,
+ `mobile` varchar(255) NOT NULL,
+ `extra` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `name` (`name`),
+ KEY `provider` (`provider`),
+ KEY `status` (`status`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_acl` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL DEFAULT '0',
+ `type` char(40) NOT NULL DEFAULT 'whitelist',
+ `source` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_action` (
+ `id` int(9) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `product` text NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `actor` varchar(100) NOT NULL DEFAULT '',
+ `action` varchar(80) NOT NULL DEFAULT '',
+ `date` datetime NOT NULL,
+ `comment` text NOT NULL,
+ `extra` text,
+ `read` enum('0','1') NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `efforted` tinyint(1) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `date` (`date`),
+ KEY `actor` (`actor`),
+ KEY `project` (`project`),
+ KEY `action` (`action`),
+ KEY `objectID` (`objectID`)
+) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_activity` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `process` mediumint(9) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `optional` varchar(255) NOT NULL,
+ `tailorNorm` varchar(255) NOT NULL,
+ `content` mediumtext NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `order` mediumint(8) DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_api` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `product` varchar(255) NOT NULL DEFAULT '',
+ `lib` int(10) unsigned NOT NULL DEFAULT '0',
+ `module` int(10) unsigned NOT NULL DEFAULT '0',
+ `title` varchar(100) NOT NULL DEFAULT '',
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `protocol` varchar(10) NOT NULL DEFAULT '',
+ `method` varchar(10) NOT NULL DEFAULT '',
+ `requestType` varchar(100) NOT NULL DEFAULT '',
+ `responseType` varchar(100) NOT NULL DEFAULT '',
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL DEFAULT '0',
+ `desc` mediumtext NULL,
+ `version` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `params` text,
+ `paramsExample` text,
+ `responseExample` text,
+ `response` text,
+ `commonParams` text,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '0',
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_api_lib_release` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `lib` int(10) unsigned NOT NULL DEFAULT '0',
+ `desc` varchar(255) NOT NULL DEFAULT '',
+ `version` varchar(255) NOT NULL DEFAULT '',
+ `snap` mediumtext NOT NULL,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_apispec` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `doc` int(10) unsigned NOT NULL DEFAULT '0',
+ `module` int(10) unsigned NOT NULL DEFAULT '0',
+ `title` varchar(100) NOT NULL DEFAULT '',
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `protocol` varchar(10) NOT NULL DEFAULT '',
+ `method` varchar(10) NOT NULL DEFAULT '',
+ `requestType` varchar(100) NOT NULL DEFAULT '',
+ `responseType` varchar(100) NOT NULL DEFAULT '',
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `owner` varchar(255) NOT NULL DEFAULT '0',
+ `desc` mediumtext NULL,
+ `version` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `params` text,
+ `paramsExample` text,
+ `responseExample` text,
+ `response` text,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=176 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_apistruct` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `lib` int(10) unsigned NOT NULL DEFAULT '0',
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `type` varchar(50) NOT NULL DEFAULT '',
+ `desc` mediumtext NOT NULL DEFAULT '',
+ `version` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `attribute` text,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '0',
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_apistruct_spec` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(50) NOT NULL DEFAULT '',
+ `desc` varchar(255) NOT NULL DEFAULT '',
+ `attribute` text,
+ `version` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approval` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `flow` mediumint(8) NOT NULL,
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `nodes` mediumtext NOT NULL,
+ `version` mediumint(9) NOT NULL,
+ `status` varchar(20) NOT NULL DEFAULT 'doing',
+ `result` varchar(20) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` tinyint(4) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalflow` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `code` varchar(100) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `version` mediumint(8) NOT NULL DEFAULT '1',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `deleted` tinyint(4) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalflowobject` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `root` int(8) NOT NULL,
+ `flow` int(8) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `extra` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalflowspec` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `flow` mediumint(8) NOT NULL,
+ `version` mediumint(8) NOT NULL,
+ `nodes` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalnode` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `approval` mediumint(8) NOT NULL,
+ `type` enum('review','cc') NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `account` char(30) NOT NULL,
+ `node` varchar(100) NOT NULL,
+ `reviewType` varchar(100) NOT NULL DEFAULT 'manual',
+ `multipleType` enum('and','or') NOT NULL DEFAULT 'and',
+ `prev` mediumtext NOT NULL,
+ `next` mediumtext NOT NULL,
+ `status` varchar(20) NOT NULL DEFAULT 'wait',
+ `result` varchar(10) NOT NULL,
+ `date` date NOT NULL,
+ `opinion` mediumtext NOT NULL,
+ `extra` mediumtext NOT NULL,
+ `reviewedBy` char(30) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `idx_reviewed_date` (`reviewedDate`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalobject` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `approval` int(8) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(8) NOT NULL,
+ `extra` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalrole` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `code` char(30) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` text NOT NULL,
+ `users` longtext NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_asset` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `group` varchar(128) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_assetlib` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `order` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_attend` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `date` date NOT NULL,
+ `signIn` time NOT NULL,
+ `signOut` time NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `ip` varchar(15) NOT NULL,
+ `device` varchar(30) NOT NULL,
+ `client` varchar(20) NOT NULL,
+ `manualIn` time NOT NULL,
+ `manualOut` time NOT NULL,
+ `reason` varchar(30) NOT NULL DEFAULT '',
+ `desc` text NOT NULL,
+ `reviewStatus` varchar(30) NOT NULL DEFAULT '',
+ `reviewedBy` char(30) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `attend` (`date`,`account`),
+ KEY `account` (`account`),
+ KEY `date` (`date`),
+ KEY `status` (`status`),
+ KEY `reason` (`reason`),
+ KEY `reviewStatus` (`reviewStatus`),
+ KEY `reviewedBy` (`reviewedBy`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_attendstat` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `month` char(10) NOT NULL DEFAULT '',
+ `normal` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `late` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `early` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `absent` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `trip` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `egress` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `lieu` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `paidLeave` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `unpaidLeave` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `timeOvertime` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `restOvertime` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `holidayOvertime` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `deserve` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `actual` decimal(12,2) NOT NULL DEFAULT '0.00',
+ `status` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `attend` (`month`,`account`),
+ KEY `account` (`account`),
+ KEY `month` (`month`),
+ KEY `status` (`status`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_auditcl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `model` char(30) NOT NULL DEFAULT 'waterfall',
+ `practiceArea` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `objectID` int(10) DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_auditplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `dateType` char(30) DEFAULT NULL,
+ `config` text,
+ `objectID` mediumint(9) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `process` mediumint(9) NOT NULL,
+ `processType` char(30) NOT NULL,
+ `checkDate` date NOT NULL,
+ `checkedBy` varchar(30) NOT NULL,
+ `realCheckDate` date NOT NULL,
+ `result` char(30) NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `checkBy` varchar(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_auditresult` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `auditplan` mediumint(8) NOT NULL,
+ `listID` mediumint(8) NOT NULL,
+ `result` char(30) NOT NULL,
+ `checkedBy` varchar(30) NOT NULL,
+ `checkedDate` date NOT NULL,
+ `comment` text NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_baseimage` (
+ `id` smallint(7) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `osType` varchar(50) NOT NULL DEFAULT '',
+ `os` varchar(50) NOT NULL DEFAULT '',
+ `osCategory` varchar(50) NOT NULL DEFAULT '',
+ `osArch` varchar(50) NOT NULL DEFAULT '',
+ `osLang` varchar(50) NOT NULL DEFAULT '',
+ `suggestCore` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ `suggestMemory` mediumint(6) unsigned NOT NULL DEFAULT '0',
+ `suggestVolume` mediumint(6) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_baseimagebrowser` (
+ `vmBackingID` int(10) NOT NULL,
+ `browserID` int(10) NOT NULL,
+ PRIMARY KEY (`vmBackingID`,`browserID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_basicmeas` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `purpose` varchar(50) NOT NULL,
+ `scope` char(30) NOT NULL,
+ `object` char(30) NOT NULL,
+ `name` varchar(90) NOT NULL,
+ `code` char(30) NOT NULL,
+ `unit` varchar(10) NOT NULL,
+ `configure` text,
+ `params` text,
+ `definition` text,
+ `source` varchar(255) DEFAULT NULL,
+ `collectType` varchar(30) NOT NULL,
+ `collectConf` text NOT NULL,
+ `execTime` varchar(30) NOT NULL,
+ `collectedBy` varchar(10) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `order` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`)
+) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_block` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `module` varchar(20) NOT NULL,
+ `type` char(30) NOT NULL,
+ `title` varchar(100) NOT NULL,
+ `source` varchar(20) NOT NULL,
+ `block` varchar(20) NOT NULL,
+ `params` text NOT NULL,
+ `order` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `grid` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `height` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `hidden` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `account_vision_module_type_order` (`account`,`vision`,`module`,`type`,`order`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_branch` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `default` enum('0','1') NOT NULL DEFAULT '0',
+ `status` enum('active','closed') NOT NULL DEFAULT 'active',
+ `desc` varchar(255) NOT NULL,
+ `createdDate` date NOT NULL,
+ `closedDate` date NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_browser` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(255) NOT NULL DEFAULT '',
+ `version` varchar(255) NOT NULL DEFAULT '',
+ `lang` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_budget` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `stage` char(30) NOT NULL,
+ `subject` mediumint(8) NOT NULL,
+ `amount` char(30) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_bug` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `injection` mediumint(8) unsigned NOT NULL,
+ `identify` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `module` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `plan` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `story` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `storyVersion` smallint(6) NOT NULL DEFAULT '1',
+ `task` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `toTask` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `toStory` mediumint(8) NOT NULL DEFAULT '0',
+ `title` varchar(255) NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `severity` tinyint(4) NOT NULL DEFAULT '0',
+ `pri` tinyint(3) unsigned NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `os` varchar(255) NOT NULL DEFAULT '',
+ `browser` varchar(255) NOT NULL DEFAULT '',
+ `hardware` varchar(30) NOT NULL,
+ `found` varchar(30) NOT NULL DEFAULT '',
+ `steps` mediumtext NOT NULL,
+ `status` enum('active','resolved','closed') NOT NULL DEFAULT 'active',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `confirmed` tinyint(1) NOT NULL DEFAULT '0',
+ `activatedCount` smallint(6) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `feedbackBy` varchar(100) NOT NULL,
+ `notifyEmail` varchar(100) NOT NULL,
+ `mailto` text,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `openedBuild` varchar(255) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime NOT NULL,
+ `deadline` date NOT NULL,
+ `resolvedBy` varchar(30) NOT NULL DEFAULT '',
+ `resolution` varchar(30) NOT NULL DEFAULT '',
+ `resolvedBuild` varchar(30) NOT NULL DEFAULT '',
+ `resolvedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `duplicateBug` mediumint(8) unsigned NOT NULL,
+ `linkBug` varchar(255) NOT NULL,
+ `case` mediumint(8) unsigned NOT NULL,
+ `caseVersion` smallint(6) NOT NULL DEFAULT '1',
+ `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `result` mediumint(8) unsigned NOT NULL,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `mr` mediumint(8) unsigned NOT NULL,
+ `entry` text NOT NULL,
+ `lines` varchar(10) NOT NULL,
+ `v1` varchar(40) NOT NULL,
+ `v2` varchar(40) NOT NULL,
+ `repoType` varchar(30) NOT NULL DEFAULT '',
+ `issueKey` varchar(50) NOT NULL DEFAULT '',
+ `testtask` mediumint(8) unsigned NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`),
+ KEY `status` (`status`),
+ KEY `plan` (`plan`),
+ KEY `story` (`story`),
+ KEY `case` (`case`),
+ KEY `toStory` (`toStory`),
+ KEY `result` (`result`),
+ KEY `assignedTo` (`assignedTo`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_build` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `name` char(150) NOT NULL,
+ `scmPath` char(255) NOT NULL,
+ `filePath` char(255) NOT NULL,
+ `date` date NOT NULL,
+ `stories` text NOT NULL,
+ `bugs` text NOT NULL,
+ `builder` char(30) NOT NULL DEFAULT '',
+ `desc` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_burn` (
+ `execution` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `date` date NOT NULL,
+ `estimate` float NOT NULL,
+ `left` float NOT NULL,
+ `consumed` float NOT NULL,
+ `storyPoint` float NOT NULL,
+ PRIMARY KEY (`execution`,`date`,`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_case` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `execution` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `module` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `story` mediumint(30) unsigned NOT NULL DEFAULT '0',
+ `storyVersion` smallint(6) NOT NULL DEFAULT '1',
+ `title` varchar(255) NOT NULL,
+ `precondition` text NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT '3',
+ `type` char(30) NOT NULL DEFAULT '1',
+ `auto` varchar(10) NOT NULL DEFAULT 'no',
+ `frame` varchar(10) NOT NULL,
+ `stage` varchar(255) NOT NULL,
+ `howRun` varchar(30) NOT NULL,
+ `scriptedBy` varchar(30) NOT NULL,
+ `scriptedDate` date NOT NULL,
+ `scriptStatus` varchar(30) NOT NULL,
+ `scriptLocation` varchar(255) NOT NULL,
+ `status` char(30) NOT NULL DEFAULT '1',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `frequency` enum('1','2','3') NOT NULL DEFAULT '1',
+ `order` tinyint(30) unsigned NOT NULL DEFAULT '0',
+ `openedBy` char(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `reviewedBy` varchar(255) NOT NULL,
+ `reviewedDate` date NOT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `version` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `linkCase` varchar(255) NOT NULL,
+ `fromBug` mediumint(8) unsigned NOT NULL,
+ `fromCaseID` mediumint(8) unsigned NOT NULL,
+ `fromCaseVersion` mediumint(8) unsigned NOT NULL DEFAULT '1',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `lastRunner` varchar(30) NOT NULL,
+ `lastRunDate` datetime NOT NULL,
+ `lastRunResult` char(30) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `story` (`story`),
+ KEY `fromBug` (`fromBug`),
+ KEY `module` (`module`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_casestep` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `case` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` smallint(3) unsigned NOT NULL DEFAULT '0',
+ `type` varchar(10) NOT NULL DEFAULT 'step',
+ `desc` text NOT NULL,
+ `expect` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `case` (`case`),
+ KEY `version` (`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_cfd` (
+ `id` int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `execution` int(8) NOT NULL,
+ `type` char(30) NOT NULL,
+ `name` char(30) NOT NULL,
+ `count` smallint NOT NULL,
+ `date` date NOT NULL,
+ UNIQUE KEY `execution_type_name_date` (`execution`,`type`,`name`,`date`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_cmcl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` char(30) NOT NULL,
+ `title` int(11) NOT NULL,
+ `contents` text NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `order` int(11) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_company` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(120) DEFAULT NULL,
+ `phone` char(20) DEFAULT NULL,
+ `fax` char(20) DEFAULT NULL,
+ `address` char(120) DEFAULT NULL,
+ `zipcode` char(10) DEFAULT NULL,
+ `website` char(120) DEFAULT NULL,
+ `backyard` char(120) DEFAULT NULL,
+ `guest` enum('1','0') NOT NULL DEFAULT '0',
+ `admins` char(255) DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_compile` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `job` mediumint(8) unsigned NOT NULL,
+ `queue` mediumint(8) NOT NULL,
+ `status` varchar(255) NOT NULL,
+ `logs` text,
+ `atTime` varchar(10) NOT NULL,
+ `testtask` mediumint(8) unsigned NOT NULL,
+ `tag` varchar(255) NOT NULL,
+ `times` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `updateDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_config` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `owner` char(30) NOT NULL DEFAULT '',
+ `module` varchar(30) NOT NULL,
+ `section` char(30) NOT NULL DEFAULT '',
+ `key` char(30) NOT NULL DEFAULT '',
+ `value` longtext NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`vision`,`owner`,`module`,`section`,`key`)
+) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
+CREATE TABLE `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`),
+ KEY `lastTime` (`lastTime`)
+) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deploy` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `begin` datetime NOT NULL,
+ `end` datetime NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `status` varchar(20) NOT NULL,
+ `owner` char(30) NOT NULL,
+ `members` text NOT NULL,
+ `notify` text NOT NULL,
+ `cases` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `result` varchar(20) NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_chart` (
+ `id` mediumint NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `dataset` varchar(30) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `settings` mediumtext NOT NULL,
+ `filters` mediumtext NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` tinyint NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dashboard` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `module` mediumint NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `layout` mediumtext NOT NULL,
+ `filters` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` tinyint NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dataset` (
+ `id` mediumint unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(155) NOT NULL,
+ `sql` text NOT NULL,
+ `fields` mediumtext NOT NULL,
+ `objects` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` tinyint NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deployproduct` (
+ `deploy` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `release` mediumint(8) unsigned NOT NULL,
+ `package` varchar(255) NOT NULL,
+ UNIQUE KEY `deploy_product_release` (`deploy`,`product`,`release`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deployscope` (
+ `deploy` mediumint(8) unsigned NOT NULL,
+ `service` mediumint(8) unsigned NOT NULL,
+ `hosts` text NOT NULL,
+ `remove` text NOT NULL,
+ `add` text NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deploystep` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `deploy` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `begin` datetime NOT NULL,
+ `end` datetime NOT NULL,
+ `stage` varchar(30) NOT NULL,
+ `content` text NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `assignedTo` char(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `finishedBy` char(30) NOT NULL,
+ `finishedDate` datetime NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dept` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(60) NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `order` smallint(4) unsigned NOT NULL DEFAULT '0',
+ `position` char(30) NOT NULL DEFAULT '',
+ `function` char(255) NOT NULL DEFAULT '',
+ `manager` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `path` (`path`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_design` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` varchar(255) NOT NULL,
+ `product` varchar(255) NOT NULL,
+ `commit` text NOT NULL,
+ `commitedBy` varchar(30) NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `name` varchar(255) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `story` char(30) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `type` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_designspec` (
+ `design` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `files` varchar(255) NOT NULL,
+ UNIQUE KEY `design` (`design`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doc` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `lib` varchar(30) NOT NULL,
+ `template` varchar(30) NOT NULL,
+ `templateType` varchar(30) NOT NULL,
+ `chapterType` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `parent` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `order` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `views` smallint(5) unsigned NOT NULL,
+ `assetLib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `assetLibType` varchar(30) NOT NULL DEFAULT '',
+ `from` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `fromVersion` smallint(6) NOT NULL DEFAULT '1',
+ `draft` longtext NOT NULL,
+ `collector` text NOT NULL,
+ `addedBy` varchar(30) NOT NULL,
+ `addedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `approvedDate` date NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `mailto` text,
+ `acl` varchar(10) NOT NULL DEFAULT 'open',
+ `groups` varchar(255) NOT NULL,
+ `users` text NOT NULL,
+ `version` smallint(5) unsigned NOT NULL DEFAULT '1',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`),
+ KEY `lib` (`lib`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doccontent` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `doc` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `digest` varchar(255) NOT NULL,
+ `content` longtext NOT NULL,
+ `files` text NOT NULL,
+ `type` varchar(10) NOT NULL,
+ `version` smallint(5) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `doc_version` (`doc`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doclib` (
+ `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(30) NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `product` mediumint(8) unsigned NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `name` varchar(60) NOT NULL,
+ `baseUrl` varchar(255) NOT NULL DEFAULT '',
+ `acl` varchar(10) NOT NULL DEFAULT 'open',
+ `groups` varchar(255) NOT NULL,
+ `users` text NOT NULL,
+ `main` enum('0','1') NOT NULL DEFAULT '0',
+ `collector` text NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `order` tinyint(5) unsigned NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_domain` (
+ `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
+ `domain` varchar(255) NOT NULL,
+ `adminURI` varchar(255) NOT NULL,
+ `resolverURI` varchar(255) NOT NULL,
+ `register` varchar(255) NOT NULL,
+ `expiredDate` datetime NOT NULL,
+ `renew` varchar(255) NOT NULL,
+ `account` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `domain` (`domain`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_durationestimation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `stage` mediumint(9) NOT NULL,
+ `workload` varchar(255) NOT NULL,
+ `worktimeRate` varchar(255) NOT NULL,
+ `people` varchar(255) NOT NULL,
+ `startDate` date NOT NULL,
+ `endDate` date NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_effort` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `product` text NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `account` varchar(30) NOT NULL,
+ `work` text,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `date` date NOT NULL,
+ `left` float NOT NULL,
+ `consumed` float NOT NULL,
+ `begin` smallint(4) unsigned zerofill NOT NULL,
+ `end` smallint(4) unsigned zerofill NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `execution` (`execution`),
+ KEY `objectID` (`objectID`),
+ KEY `date` (`date`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_entry` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `account` varchar(30) NOT NULL DEFAULT '',
+ `code` varchar(20) NOT NULL,
+ `key` varchar(32) NOT NULL,
+ `freePasswd` enum('0','1') NOT NULL DEFAULT '0',
+ `ip` varchar(100) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `calledTime` int(10) unsigned NOT NULL DEFAULT '0',
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_expect` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `userID` mediumint(8) NOT NULL,
+ `project` mediumint(8) NOT NULL DEFAULT '0',
+ `expect` text NOT NULL,
+ `progress` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_extension` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(150) NOT NULL,
+ `code` varchar(30) NOT NULL,
+ `version` varchar(50) NOT NULL,
+ `author` varchar(100) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `license` text NOT NULL,
+ `type` varchar(20) NOT NULL DEFAULT 'extension',
+ `site` varchar(150) NOT NULL,
+ `zentaoCompatible` varchar(100) NOT NULL,
+ `installedTime` datetime NOT NULL,
+ `depends` varchar(100) NOT NULL,
+ `dirs` mediumtext NOT NULL,
+ `files` mediumtext NOT NULL,
+ `status` varchar(20) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`),
+ KEY `name` (`name`),
+ KEY `installedTime` (`installedTime`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_faq` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `module` mediumint(9) NOT NULL,
+ `product` mediumint(9) NOT NULL,
+ `question` varchar(255) NOT NULL,
+ `answer` text NOT NULL,
+ `addedtime` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_feedback` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL,
+ `module` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `type` char(30) NOT NULL,
+ `solution` char(30) NOT NULL,
+ `desc` text NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `public` enum('0','1') NOT NULL DEFAULT '0',
+ `notify` enum('0','1') NOT NULL DEFAULT '0',
+ `notifyEmail` varchar(100) NOT NULL,
+ `likes` text NOT NULL,
+ `result` mediumint(8) unsigned NOT NULL,
+ `faq` mediumint(8) unsigned NOT NULL,
+ `openedBy` char(30) NOT NULL,
+ `openedDate` datetime NOT NULL,
+ `reviewedBy` varchar(255) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ `processedBy` char(30) NOT NULL,
+ `processedDate` datetime NOT NULL,
+ `closedBy` char(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `closedReason` varchar(30) NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedTo` varchar(255) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `feedbackBy` varchar(100) NOT NULL,
+ `repeatFeedback` mediumint(8) NOT NULL DEFAULT 0,
+ `mailto` varchar(255) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_feedbackview` (
+ `account` char(30) NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ UNIQUE KEY `account_product` (`account`,`product`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_file` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `pathname` char(100) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `extension` char(30) NOT NULL,
+ `size` int(10) unsigned NOT NULL DEFAULT '0',
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `addedBy` char(30) NOT NULL DEFAULT '',
+ `addedDate` datetime NOT NULL,
+ `downloads` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `extra` varchar(255) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `objectType` (`objectType`),
+ KEY `objectID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_gapanalysis` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `account` varchar(30) NOT NULL,
+ `role` varchar(20) NOT NULL,
+ `analysis` mediumtext NOT NULL,
+ `needTrain` enum('no','yes') NOT NULL DEFAULT 'no',
+ `createdBy` char(30) DEFAULT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `project_account` (`project`,`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_group` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `name` char(30) NOT NULL,
+ `role` char(30) NOT NULL DEFAULT '',
+ `desc` char(255) NOT NULL DEFAULT '',
+ `acl` text,
+ `developer` enum('0','1') NOT NULL DEFAULT '1',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_grouppriv` (
+ `group` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `module` char(30) NOT NULL DEFAULT '',
+ `method` char(30) NOT NULL DEFAULT '',
+ UNIQUE KEY `group` (`group`,`module`,`method`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_history` (
+ `id` int(9) unsigned NOT NULL AUTO_INCREMENT,
+ `action` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `field` varchar(30) NOT NULL DEFAULT '',
+ `old` text NOT NULL,
+ `new` text NOT NULL,
+ `diff` mediumtext NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `action` (`action`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_holiday` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `type` enum('holiday','working') NOT NULL DEFAULT 'holiday',
+ `desc` mediumtext NOT NULL,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_host` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `assetID` mediumint(8) unsigned NOT NULL,
+ `admin` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `serverRoom` mediumint(8) unsigned NOT NULL,
+ `cabinet` varchar(128) NOT NULL,
+ `serverModel` varchar(256) NOT NULL,
+ `hardwareType` varchar(64) NOT NULL,
+ `hostType` enum('physical','virtual') NOT NULL,
+ `cpuBrand` varchar(128) NOT NULL,
+ `cpuModel` varchar(128) NOT NULL,
+ `cpuNumber` varchar(16) NOT NULL,
+ `cpuCores` varchar(30) NOT NULL,
+ `cpuRate` varchar(30) NOT NULL,
+ `memory` varchar(30) NOT NULL,
+ `diskType` varchar(30) NOT NULL,
+ `diskSize` varchar(30) NOT NULL,
+ `unit` enum('GB','TB') NOT NULL DEFAULT 'GB',
+ `privateIP` varchar(128) NOT NULL,
+ `publicIP` varchar(128) NOT NULL,
+ `nic` varchar(128) NOT NULL,
+ `mac` varchar(128) NOT NULL,
+ `osName` varchar(64) NOT NULL,
+ `osVersion` varchar(64) NOT NULL,
+ `webserver` varchar(128) NOT NULL,
+ `database` varchar(128) NOT NULL,
+ `language` varchar(16) NOT NULL,
+ `status` varchar(50) NOT NULL,
+ `agentPort` varchar(10) NOT NULL,
+ `instanceNum` tinyint(4) NOT NULL DEFAULT '0',
+ `pri` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `heartbeatTime` datetime NOT NULL,
+ `tags` varchar(50) NOT NULL DEFAULT '',
+ `provider` varchar(255) NOT NULL DEFAULT '',
+ `bridgeID` varchar(255) NOT NULL DEFAULT '',
+ `cloudKey` varchar(255) NOT NULL DEFAULT '',
+ `cloudSecret` varchar(255) NOT NULL DEFAULT '',
+ `cloudRegion` varchar(255) NOT NULL DEFAULT '',
+ `cloudNamespace` varchar(255) NOT NULL DEFAULT '',
+ `cloudUser` varchar(255) NOT NULL DEFAULT '',
+ `cloudAccount` varchar(255) NOT NULL DEFAULT '',
+ `cloudPassword` varchar(255) NOT NULL DEFAULT '',
+ `couldVPC` varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_chat` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `gid` char(40) NOT NULL DEFAULT '',
+ `name` varchar(60) NOT NULL DEFAULT '',
+ `type` varchar(20) NOT NULL DEFAULT 'group',
+ `admins` varchar(255) NOT NULL DEFAULT '',
+ `committers` varchar(255) NOT NULL DEFAULT '',
+ `subject` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `public` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `ownedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `mergedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `lastActiveTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `lastMessage` int(11) unsigned NOT NULL DEFAULT '0',
+ `lastMessageIndex` int(11) unsigned NOT NULL DEFAULT 0,
+ `dismissDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `pinnedMessages` text NOT NULL,
+ `mergedChats` text NOT NULL DEFAULT '',
+ `adminInvite` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `gid` (`gid`),
+ KEY `name` (`name`),
+ KEY `type` (`type`),
+ KEY `public` (`public`),
+ KEY `createdBy` (`createdBy`),
+ KEY `editedBy` (`editedBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_chat_message_index` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `gid` char(40) NOT NULL,
+ `tableName` char(64) NOT NULL,
+ `start` int(11) unsigned NOT NULL,
+ `end` int(11) unsigned NOT NULL,
+ `startIndex` int(11) unsigned NOT NULL,
+ `endIndex` int(11) unsigned NOT NULL,
+ `startDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `count` mediumint(8) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `chattable` (`gid`,`tableName`),
+ KEY `start` (`start`),
+ KEY `end` (`end`),
+ KEY `startDate` (`startDate`),
+ KEY `endDate` (`endDate`),
+ KEY `chatstartindex` (`gid`,`startIndex`),
+ KEY `chatendindex` (`gid`,`endIndex`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_chatuser` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `user` mediumint(8) NOT NULL DEFAULT '0',
+ `order` smallint(5) NOT NULL DEFAULT '0',
+ `star` enum('0','1') NOT NULL DEFAULT '0',
+ `hide` enum('0','1') NOT NULL DEFAULT '0',
+ `mute` enum('0','1') NOT NULL DEFAULT '0',
+ `freeze` enum('0','1') NOT NULL DEFAULT '0',
+ `join` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `quit` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `category` varchar(40) NOT NULL DEFAULT '',
+ `lastReadMessage` int(11) unsigned NOT NULL DEFAULT '0',
+ `lastReadMessageIndex` int(11) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `chatuser` (`cgid`,`user`),
+ KEY `cgid` (`cgid`),
+ KEY `user` (`user`),
+ KEY `order` (`order`),
+ KEY `star` (`star`),
+ KEY `hide` (`hide`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_client` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `version` char(30) NOT NULL DEFAULT '',
+ `desc` varchar(100) NOT NULL DEFAULT '',
+ `changeLog` text NOT NULL,
+ `strategy` varchar(10) NOT NULL DEFAULT '',
+ `downloads` text NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `status` enum('released','wait') NOT NULL DEFAULT 'wait',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_conference` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `rid` char(40) NOT NULL DEFAULT '',
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `status` enum('closed','open') NOT NULL DEFAULT 'closed',
+ `participants` text NOT NULL,
+ `invitee` text NOT NULL,
+ `openedBy` mediumint(8) NOT NULL DEFAULT '0',
+ `openedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_conferenceaction` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `rid` char(40) NOT NULL DEFAULT '',
+ `type` enum('create','invite','join','leave','close','publish') NOT NULL DEFAULT 'create',
+ `data` text NOT NULL,
+ `user` mediumint(8) NOT NULL DEFAULT '0',
+ `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `device` char(40) NOT NULL DEFAULT 'default',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_message` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `gid` char(40) NOT NULL DEFAULT '',
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `user` varchar(30) NOT NULL DEFAULT '',
+ `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `index` int(11) unsigned NOT NULL DEFAULT 0,
+ `type` enum('normal','broadcast','notify','bulletin') NOT NULL DEFAULT 'normal',
+ `content` text NOT NULL,
+ `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text',
+ `data` text NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `mgid` (`gid`),
+ KEY `mcgid` (`cgid`),
+ KEY `muser` (`user`),
+ KEY `mtype` (`type`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_message_backup` (
+ `id` int(11) unsigned NOT NULL,
+ `gid` char(40) NOT NULL DEFAULT '',
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `user` varchar(30) NOT NULL DEFAULT '',
+ `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `index` int(11) unsigned NOT NULL DEFAULT 0,
+ `type` enum('normal','broadcast','notify') NOT NULL DEFAULT 'normal',
+ `content` text NOT NULL,
+ `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text',
+ `data` text NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_message_index` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `tableName` char(64) NOT NULL,
+ `start` int(11) unsigned NOT NULL,
+ `end` int(11) unsigned NOT NULL,
+ `startDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `chats` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `tableName` (`tableName`),
+ KEY `start` (`start`),
+ KEY `end` (`end`),
+ KEY `startDate` (`startDate`),
+ KEY `endDate` (`endDate`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_messagestatus` (
+ `user` mediumint(8) NOT NULL DEFAULT '0',
+ `message` int(11) unsigned NOT NULL,
+ `status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting',
+ UNIQUE KEY `user` (`user`,`message`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_queue` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` char(30) NOT NULL,
+ `content` text NOT NULL,
+ `addDate` datetime NOT NULL,
+ `processDate` datetime NOT NULL,
+ `result` text NOT NULL,
+ `status` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_im_userdevice` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `user` mediumint(8) NOT NULL DEFAULT '0',
+ `device` char(40) NOT NULL DEFAULT 'default',
+ `deviceID` char(40) NOT NULL DEFAULT '',
+ `token` char(64) NOT NULL DEFAULT '',
+ `validUntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `lastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `lastLogout` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `userdevice` (`user`,`device`),
+ KEY `user` (`user`),
+ KEY `lastLogin` (`lastLogin`),
+ KEY `lastLogout` (`lastLogout`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_intervention` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `activity` mediumint(8) NOT NULL,
+ `status` char(30) NOT NULL,
+ `partake` text NOT NULL,
+ `begin` date NOT NULL,
+ `realBegin` date NOT NULL,
+ `situation` varchar(255) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `project` (`project`,`activity`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_issue` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `resolvedBy` varchar(30) NOT NULL,
+ `project` varchar(255) NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `pri` char(30) NOT NULL,
+ `severity` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `activity` varchar(255) NOT NULL,
+ `deadline` date NOT NULL,
+ `resolution` char(30) NOT NULL,
+ `resolutionComment` text NOT NULL,
+ `objectID` varchar(255) NOT NULL,
+ `resolvedDate` date NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `owner` varchar(255) NOT NULL,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `from` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `activateBy` varchar(30) NOT NULL,
+ `activateDate` date NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` date NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `approvedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_job` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `frame` varchar(20) NOT NULL,
+ `engine` varchar(20) NOT NULL,
+ `server` mediumint(8) unsigned NOT NULL,
+ `pipeline` varchar(500) NOT NULL,
+ `triggerType` varchar(255) NOT NULL,
+ `sonarqubeServer` mediumint(8) unsigned NOT NULL,
+ `projectKey` varchar(255) NOT NULL,
+ `svnDir` varchar(255) NOT NULL,
+ `atDay` varchar(255) DEFAULT NULL,
+ `atTime` varchar(10) DEFAULT NULL,
+ `customParam` text NOT NULL,
+ `comment` varchar(255) DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `lastExec` datetime DEFAULT NULL,
+ `lastStatus` varchar(255) DEFAULT NULL,
+ `lastTag` varchar(255) DEFAULT NULL,
+ `lastSyncDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanban` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `space` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `owner` varchar(30) NOT NULL,
+ `team` text NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `archived` enum('0','1') NOT NULL DEFAULT '1',
+ `performable` enum('0','1') NOT NULL DEFAULT '0',
+ `status` enum('active','closed') NOT NULL DEFAULT 'active',
+ `order` mediumint(8) NOT NULL DEFAULT '0',
+ `displayCards` smallint(6) NOT NULL DEFAULT '0',
+ `showWIP` enum('0','1') NOT NULL DEFAULT '1',
+ `fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
+ `object` varchar(255) NOT NULL,
+ `alignment` varchar(10) NOT NULL DEFAULT 'center',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `closedBy` char(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `activatedBy` char(30) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbancard` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `kanban` mediumint(8) unsigned NOT NULL,
+ `region` mediumint(8) unsigned NOT NULL,
+ `group` mediumint(8) unsigned NOT NULL,
+ `fromID` mediumint(8) unsigned NOT NULL,
+ `fromType` varchar(30) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT 'doing',
+ `pri` mediumint(8) unsigned NOT NULL,
+ `assignedTo` text NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `estimate` float unsigned NOT NULL,
+ `progress` float unsigned NOT NULL DEFAULT '0',
+ `color` char(7) NOT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `order` mediumint(8) NOT NULL DEFAULT '0',
+ `archived` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `archivedBy` char(30) NOT NULL,
+ `archivedDate` datetime NOT NULL,
+ `assignedBy` char(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbancell` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `kanban` mediumint(8) NOT NULL,
+ `lane` mediumint(8) NOT NULL,
+ `column` mediumint(8) NOT NULL,
+ `type` char(30) NOT NULL,
+ `cards` text NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `card_group` (`kanban`,`type`,`lane`,`column`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbancolumn` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `parent` mediumint(8) NOT NULL DEFAULT '0',
+ `type` char(30) NOT NULL,
+ `region` mediumint(8) unsigned NOT NULL,
+ `group` mediumint(8) NOT NULL DEFAULT '0',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `color` char(30) NOT NULL,
+ `limit` smallint(6) NOT NULL DEFAULT '-1',
+ `order` mediumint(8) NOT NULL DEFAULT '0',
+ `archived` enum('0','1') NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbangroup` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `kanban` mediumint(8) unsigned NOT NULL,
+ `region` mediumint(8) unsigned NOT NULL,
+ `order` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbanlane` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `execution` mediumint(8) NOT NULL DEFAULT '0',
+ `type` char(30) NOT NULL,
+ `region` mediumint(8) unsigned NOT NULL,
+ `group` mediumint(8) unsigned NOT NULL,
+ `groupby` char(30) NOT NULL,
+ `extra` char(30) NOT NULL,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `color` char(30) NOT NULL,
+ `order` smallint(6) NOT NULL DEFAULT '0',
+ `lastEditedTime` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbanregion` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `space` mediumint(8) unsigned NOT NULL,
+ `kanban` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `order` mediumint(8) NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbanspace` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(50) NOT NULL,
+ `owner` varchar(30) NOT NULL,
+ `team` text NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `status` enum('active','closed') NOT NULL DEFAULT 'active',
+ `order` mediumint(8) NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `closedBy` char(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `activatedBy` char(30) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_lang` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `lang` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `section` varchar(30) NOT NULL,
+ `key` varchar(60) NOT NULL,
+ `value` text NOT NULL,
+ `system` enum('0','1') NOT NULL DEFAULT '1',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`,`vision`)
+) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_leave` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `start` time NOT NULL,
+ `finish` time NOT NULL,
+ `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0',
+ `backDate` datetime NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `desc` text NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `reviewedBy` char(30) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ `level` tinyint(3) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `reviewers` text NOT NULL,
+ `backReviewers` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `type` (`type`),
+ KEY `status` (`status`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_lieu` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `start` time NOT NULL,
+ `finish` time NOT NULL,
+ `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0',
+ `overtime` char(255) NOT NULL,
+ `trip` char(255) NOT NULL,
+ `desc` text NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `reviewedBy` char(30) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ `level` tinyint(3) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `reviewers` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `status` (`status`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_log` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `action` mediumint(8) unsigned NOT NULL,
+ `date` datetime NOT NULL,
+ `url` varchar(255) NOT NULL,
+ `contentType` varchar(30) NOT NULL,
+ `data` text NOT NULL,
+ `result` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `objectType` (`objectType`),
+ KEY `obejctID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_measqueue` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(30) NOT NULL,
+ `mid` mediumint(8) unsigned NOT NULL,
+ `status` varchar(255) NOT NULL,
+ `logs` text,
+ `execTime` varchar(10) NOT NULL,
+ `params` text,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `updateDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_measrecords` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `type` varchar(30) NOT NULL,
+ `mid` mediumint(8) NOT NULL,
+ `measCode` char(50) NOT NULL DEFAULT '',
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `params` text NOT NULL,
+ `year` char(4) NOT NULL,
+ `month` char(6) NOT NULL,
+ `week` char(8) NOT NULL,
+ `day` char(8) NOT NULL,
+ `value` varchar(255) NOT NULL,
+ `date` date NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `project` (`project`),
+ KEY `time` (`year`,`month`,`day`,`week`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_meastemplate` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `model` char(30) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `content` mediumtext NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_meeting` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL,
+ `execution` mediumint(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `begin` time NOT NULL,
+ `end` time NOT NULL,
+ `dept` mediumint(8) NOT NULL,
+ `mode` varchar(255) NOT NULL,
+ `host` varchar(30) NOT NULL,
+ `participant` text NOT NULL,
+ `date` date NOT NULL,
+ `room` int(11) NOT NULL,
+ `minutes` text NOT NULL,
+ `minutedBy` varchar(30) NOT NULL,
+ `minutedDate` datetime NOT NULL,
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(8) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_meetingroom` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `position` varchar(30) NOT NULL,
+ `seats` int(11) NOT NULL,
+ `equipment` varchar(255) NOT NULL,
+ `openTime` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_module` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `root` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `name` char(60) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `order` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `type` char(30) NOT NULL,
+ `from` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `owner` varchar(30) NOT NULL,
+ `collector` text NOT NULL,
+ `short` varchar(30) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `root` (`root`),
+ KEY `type` (`type`),
+ KEY `path` (`path`)
+) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_mr` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `hostID` mediumint(8) unsigned NOT NULL,
+ `sourceProject` varchar(50) NOT NULL,
+ `sourceBranch` varchar(100) NOT NULL,
+ `targetProject` varchar(50) NOT NULL,
+ `targetBranch` varchar(100) NOT NULL,
+ `mriid` int(10) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `description` text NOT NULL,
+ `assignee` varchar(255) NOT NULL,
+ `reviewer` varchar(255) NOT NULL,
+ `approver` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `status` char(30) NOT NULL,
+ `mergeStatus` char(30) NOT NULL,
+ `approvalStatus` char(30) NOT NULL,
+ `needApproved` enum('0','1') NOT NULL DEFAULT '0',
+ `needCI` enum('0','1') NOT NULL DEFAULT '0',
+ `repoID` mediumint(8) unsigned NOT NULL,
+ `jobID` mediumint(8) unsigned NOT NULL,
+ `compileID` mediumint(8) unsigned NOT NULL,
+ `compileStatus` char(30) NOT NULL,
+ `removeSourceBranch` enum('0','1') NOT NULL DEFAULT '0',
+ `synced` enum('0','1') NOT NULL DEFAULT '1',
+ `syncError` varchar(255) NOT NULL,
+ `hasNoConflict` enum('0','1') NOT NULL DEFAULT '0',
+ `diffs` longtext,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_mrapproval` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `mrID` mediumint(8) unsigned NOT NULL,
+ `account` varchar(255) NOT NULL,
+ `date` datetime NOT NULL,
+ `action` char(30) NOT NULL,
+ `comment` text NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_nc` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `auditplan` mediumint(8) NOT NULL,
+ `listID` mediumint(8) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `type` char(30) NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT 'active',
+ `severity` char(30) NOT NULL,
+ `deadline` date NOT NULL,
+ `resolvedBy` varchar(30) NOT NULL,
+ `resolution` char(30) NOT NULL,
+ `resolvedDate` date NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` date NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` date NOT NULL,
+ `activateDate` date NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_notify` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(50) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `action` mediumint(9) NOT NULL,
+ `toList` varchar(255) NOT NULL,
+ `ccList` text NOT NULL,
+ `subject` varchar(255) NOT NULL,
+ `data` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `sendTime` datetime NOT NULL,
+ `status` varchar(10) NOT NULL DEFAULT 'wait',
+ `failReason` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `objectType_toList_status` (`objectType`,`toList`,`status`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_oauth` (
+ `account` varchar(30) NOT NULL,
+ `openID` varchar(255) NOT NULL,
+ `providerType` varchar(30) NOT NULL,
+ `providerID` mediumint(8) unsigned NOT NULL,
+ KEY `account` (`account`),
+ KEY `providerType` (`providerType`),
+ KEY `providerID` (`providerID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_object` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) NOT NULL,
+ `from` mediumint(8) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `category` char(30) NOT NULL,
+ `version` varchar(255) NOT NULL,
+ `type` enum('reviewed','taged') NOT NULL,
+ `range` text NOT NULL,
+ `data` text NOT NULL,
+ `storyEst` char(30) NOT NULL,
+ `taskEst` char(30) NOT NULL,
+ `requestEst` char(30) NOT NULL,
+ `testEst` char(30) NOT NULL,
+ `devEst` char(30) NOT NULL,
+ `designEst` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_opportunity` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `source` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `strategy` char(30) NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT 'active',
+ `impact` mediumint(8) NOT NULL,
+ `chance` mediumint(8) NOT NULL,
+ `ratio` mediumint(8) NOT NULL,
+ `pri` char(30) NOT NULL,
+ `identifiedDate` date NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` date NOT NULL,
+ `approvedDate` date NOT NULL,
+ `prevention` mediumtext NOT NULL,
+ `plannedClosedDate` date NOT NULL,
+ `actualClosedDate` date NOT NULL,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `from` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `activatedBy` varchar(30) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `canceledBy` varchar(30) NOT NULL,
+ `canceledDate` datetime NOT NULL,
+ `cancelReason` char(30) NOT NULL,
+ `hangupedBy` varchar(30) NOT NULL,
+ `hangupedDate` datetime NOT NULL,
+ `resolution` mediumtext NOT NULL,
+ `resolvedBy` varchar(30) NOT NULL,
+ `resolvedDate` datetime NOT NULL,
+ `lastCheckedBy` varchar(30) NOT NULL,
+ `lastCheckedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_overtime` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `start` time NOT NULL,
+ `finish` time NOT NULL,
+ `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0',
+ `leave` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `desc` text NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `rejectReason` varchar(100) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `reviewedBy` char(30) NOT NULL,
+ `reviewedDate` datetime NOT NULL,
+ `level` tinyint(3) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `reviewers` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `type` (`type`),
+ KEY `status` (`status`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_pipeline` (
+ `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` char(30) NOT NULL,
+ `name` varchar(50) NOT NULL,
+ `url` varchar(255) DEFAULT NULL,
+ `account` varchar(30) DEFAULT NULL,
+ `password` varchar(255) NOT NULL,
+ `token` varchar(255) DEFAULT NULL,
+ `private` char(32) DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_planstory` (
+ `plan` mediumint(8) unsigned NOT NULL,
+ `story` mediumint(8) unsigned NOT NULL,
+ `order` mediumint(9) NOT NULL,
+ UNIQUE KEY `plan_story` (`plan`,`story`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_process` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `model` char(30) NOT NULL DEFAULT 'waterfall',
+ `name` varchar(255) NOT NULL,
+ `type` char(30) NOT NULL,
+ `abbr` char(30) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `order` mediumint(9) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_product` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `program` mediumint(8) unsigned NOT NULL,
+ `name` varchar(90) NOT NULL,
+ `code` varchar(45) NOT NULL,
+ `bind` enum('0','1') NOT NULL DEFAULT '0',
+ `line` mediumint(8) NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT 'normal',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `desc` mediumtext NOT NULL,
+ `PO` varchar(30) NOT NULL,
+ `QD` varchar(30) NOT NULL,
+ `RD` varchar(30) NOT NULL,
+ `feedback` varchar(30) NOT NULL,
+ `acl` enum('open','private','custom') NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `reviewer` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `createdVersion` varchar(20) NOT NULL,
+ `order` mediumint(8) unsigned NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `acl` (`acl`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_productplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `parent` mediumint(9) NOT NULL DEFAULT '0',
+ `title` varchar(90) NOT NULL,
+ `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
+ `desc` mediumtext NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `order` text NOT NULL,
+ `closedReason` varchar(20) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `end` (`end`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programactivity` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `process` mediumint(8) NOT NULL,
+ `activity` mediumint(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `content` text NOT NULL,
+ `reason` varchar(255) NOT NULL,
+ `result` char(30) NOT NULL,
+ `linkedBy` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programoutput` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `process` mediumint(8) NOT NULL,
+ `activity` mediumint(8) NOT NULL,
+ `output` mediumint(8) NOT NULL,
+ `content` text NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `reason` varchar(255) NOT NULL,
+ `result` char(30) NOT NULL,
+ `linkedBy` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programprocess` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `process` mediumint(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `type` char(30) NOT NULL,
+ `abbr` char(30) NOT NULL,
+ `desc` text NOT NULL,
+ `reason` varchar(255) NOT NULL,
+ `linkedBy` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programreport` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `template` mediumint(8) NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `params` text NOT NULL,
+ `content` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_project` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL DEFAULT '0',
+ `model` char(30) NOT NULL,
+ `type` char(30) NOT NULL DEFAULT 'sprint',
+ `lifetime` char(30) NOT NULL DEFAULT '',
+ `budget` varchar(30) NOT NULL DEFAULT '0',
+ `budgetUnit` char(30) NOT NULL DEFAULT 'CNY',
+ `attribute` varchar(30) NOT NULL DEFAULT '',
+ `percent` float unsigned NOT NULL DEFAULT '0',
+ `milestone` enum('0','1') NOT NULL DEFAULT '0',
+ `output` text NOT NULL,
+ `auth` char(30) NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` varchar(255) NOT NULL,
+ `grade` tinyint(3) unsigned NOT NULL,
+ `name` varchar(90) NOT NULL,
+ `code` varchar(45) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `realBegan` date NOT NULL,
+ `realEnd` date NOT NULL,
+ `days` smallint(5) unsigned NOT NULL,
+ `status` varchar(10) NOT NULL,
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `pri` enum('1','2','3','4') NOT NULL DEFAULT '1',
+ `desc` mediumtext NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `parentVersion` smallint(6) NOT NULL,
+ `planDuration` int(11) NOT NULL,
+ `realDuration` int(11) NOT NULL,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `openedVersion` varchar(20) NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `canceledBy` varchar(30) NOT NULL DEFAULT '',
+ `canceledDate` datetime NOT NULL,
+ `suspendedDate` date NOT NULL,
+ `PO` varchar(30) NOT NULL DEFAULT '',
+ `PM` varchar(30) NOT NULL DEFAULT '',
+ `QD` varchar(30) NOT NULL DEFAULT '',
+ `RD` varchar(30) NOT NULL DEFAULT '',
+ `team` varchar(90) NOT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `order` mediumint(8) unsigned NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `displayCards` smallint(6) NOT NULL DEFAULT '0',
+ `fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `begin` (`begin`),
+ KEY `end` (`end`),
+ KEY `status` (`status`),
+ KEY `acl` (`acl`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectadmin` (
+ `group` smallint(6) NOT NULL,
+ `account` char(30) NOT NULL,
+ `programs` text NOT NULL,
+ `projects` text NOT NULL,
+ `products` text NOT NULL,
+ `executions` text NOT NULL,
+ UNIQUE KEY `group_account` (`group`, `account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectcase` (
+ `project` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `case` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `count` mediumint(8) unsigned NOT NULL DEFAULT '1',
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `order` smallint(6) unsigned NOT NULL,
+ UNIQUE KEY `project` (`project`,`case`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectproduct` (
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `plan` varchar(255) NOT NULL,
+ PRIMARY KEY (`project`,`product`,`branch`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectspec` (
+ `project` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `milestone` enum('0','1') NOT NULL DEFAULT '0',
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ UNIQUE KEY `project` (`project`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectstory` (
+ `project` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `product` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `order` smallint(6) unsigned NOT NULL,
+ UNIQUE KEY `project` (`project`,`story`),
+ KEY `story` (`story`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_relation` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL,
+ `product` mediumint(8) NOT NULL,
+ `execution` mediumint(8) NOT NULL,
+ `AType` char(30) NOT NULL,
+ `AID` mediumint(8) NOT NULL,
+ `AVersion` char(30) NOT NULL,
+ `relation` char(30) NOT NULL,
+ `BType` char(30) NOT NULL,
+ `BID` mediumint(8) NOT NULL,
+ `BVersion` char(30) NOT NULL,
+ `extra` char(30) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`,`AID`,`BID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_relationoftasks` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `pretask` mediumint(8) unsigned NOT NULL,
+ `condition` enum('begin','end') NOT NULL,
+ `task` mediumint(8) unsigned NOT NULL,
+ `action` enum('begin','end') NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `relationoftasks` (`execution`,`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_release` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `build` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `marker` enum('0','1') NOT NULL DEFAULT '0',
+ `date` date NOT NULL,
+ `stories` text NOT NULL,
+ `bugs` text NOT NULL,
+ `leftBugs` text NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `mailto` text,
+ `notify` varchar(255) DEFAULT NULL,
+ `status` varchar(20) NOT NULL DEFAULT 'normal',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `build` (`build`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repo` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `product` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `path` varchar(255) NOT NULL,
+ `prefix` varchar(100) NOT NULL,
+ `encoding` varchar(20) NOT NULL,
+ `SCM` varchar(10) NOT NULL,
+ `client` varchar(100) NOT NULL,
+ `serviceHost` varchar(50) NOT NULL,
+ `serviceProject` varchar(100) NOT NULL,
+ `commits` mediumint(8) unsigned NOT NULL,
+ `account` varchar(30) NOT NULL,
+ `password` varchar(30) NOT NULL,
+ `encrypt` varchar(30) NOT NULL DEFAULT 'plain',
+ `acl` text NOT NULL,
+ `synced` tinyint(1) NOT NULL DEFAULT '0',
+ `lastSync` datetime NOT NULL,
+ `desc` text NOT NULL,
+ `extra` char(30) NOT NULL,
+ `preMerge` enum('0','1') NOT NULL DEFAULT '0',
+ `job` mediumint(8) unsigned NOT NULL,
+ `fileServerUrl` text,
+ `fileServerAccount` varchar(40) NOT NULL DEFAULT '',
+ `fileServerPassword` varchar(100) NOT NULL DEFAULT '',
+ `deleted` tinyint(1) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repobranch` (
+ `repo` mediumint(8) unsigned NOT NULL,
+ `revision` mediumint(8) unsigned NOT NULL,
+ `branch` varchar(255) NOT NULL,
+ UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`),
+ KEY `branch` (`branch`),
+ KEY `revision` (`revision`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repofiles` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `revision` mediumint(8) unsigned NOT NULL,
+ `path` varchar(255) NOT NULL,
+ `parent` varchar(255) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `action` char(1) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `path` (`path`),
+ KEY `parent` (`parent`),
+ KEY `repo` (`repo`),
+ KEY `revision` (`revision`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repohistory` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `repo` mediumint(9) NOT NULL,
+ `revision` varchar(40) NOT NULL,
+ `commit` mediumint(8) unsigned NOT NULL,
+ `comment` text NOT NULL,
+ `committer` varchar(100) NOT NULL,
+ `time` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `repo` (`repo`),
+ KEY `revision` (`revision`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_report` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `code` varchar(100) NOT NULL,
+ `name` text NOT NULL,
+ `module` varchar(100) NOT NULL,
+ `sql` text NOT NULL,
+ `vars` text NOT NULL,
+ `langs` text NOT NULL,
+ `params` text NOT NULL,
+ `step` tinyint(1) NOT NULL DEFAULT '2',
+ `desc` text NOT NULL,
+ `addedBy` char(30) NOT NULL,
+ `addedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`)
+) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_researchplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `customer` varchar(255) NOT NULL,
+ `stakeholder` varchar(255) NOT NULL,
+ `objective` varchar(255) NOT NULL,
+ `begin` datetime NOT NULL,
+ `end` datetime NOT NULL,
+ `location` varchar(255) NOT NULL,
+ `team` varchar(255) NOT NULL,
+ `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL,
+ `outline` mediumtext NOT NULL,
+ `schedule` mediumtext NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_researchreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `relatedPlan` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `author` varchar(30) NOT NULL,
+ `content` mediumtext NOT NULL,
+ `customer` varchar(255) NOT NULL,
+ `researchObjects` varchar(255) NOT NULL,
+ `begin` datetime NOT NULL,
+ `end` datetime NOT NULL,
+ `location` varchar(255) NOT NULL,
+ `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_review` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `object` mediumint(8) NOT NULL,
+ `template` mediumint(8) NOT NULL,
+ `doc` mediumint(8) DEFAULT NULL,
+ `docVersion` smallint(6) NOT NULL,
+ `status` char(30) NOT NULL,
+ `reviewedBy` varchar(255) NOT NULL,
+ `auditedBy` varchar(255) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deadline` date NOT NULL,
+ `lastReviewedBy` varchar(255) DEFAULT NULL,
+ `lastReviewedDate` date NOT NULL,
+ `lastAuditedBy` varchar(255) NOT NULL,
+ `lastAuditedDate` date NOT NULL,
+ `lastEditedBy` varchar(255) NOT NULL,
+ `lastEditedDate` date NOT NULL,
+ `result` char(30) NOT NULL,
+ `auditResult` char(30) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewcl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `title` varchar(255) NOT NULL,
+ `object` char(30) NOT NULL,
+ `category` char(30) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `order` mediumint(8) DEFAULT '0',
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewissue` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `review` mediumint(8) NOT NULL,
+ `approval` mediumint(8) NOT NULL,
+ `injection` mediumint(8) NOT NULL,
+ `identify` mediumint(8) NOT NULL,
+ `type` char(30) NOT NULL DEFAULT 'review',
+ `listID` mediumint(8) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `opinion` varchar(255) NOT NULL,
+ `opinionDate` date NOT NULL,
+ `status` char(30) NOT NULL,
+ `resolution` char(30) NOT NULL,
+ `resolutionBy` char(30) NOT NULL,
+ `resolutionDate` date NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewlist` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `title` varchar(255) NOT NULL,
+ `object` char(30) NOT NULL,
+ `category` char(30) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewresult` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `review` mediumint(8) NOT NULL,
+ `type` char(30) NOT NULL DEFAULT 'review',
+ `result` char(30) NOT NULL,
+ `opinion` text NOT NULL,
+ `reviewer` char(30) NOT NULL,
+ `remainIssue` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `consumed` float NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `reviewer` (`review`,`reviewer`,`type`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_risk` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` varchar(255) NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `source` char(30) NOT NULL,
+ `category` char(30) NOT NULL,
+ `strategy` char(30) NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT 'active',
+ `impact` char(30) NOT NULL,
+ `probability` char(30) NOT NULL,
+ `rate` char(30) NOT NULL,
+ `pri` char(30) NOT NULL,
+ `identifiedDate` date NOT NULL,
+ `prevention` mediumtext NOT NULL,
+ `remedy` mediumtext NOT NULL,
+ `plannedClosedDate` date NOT NULL,
+ `actualClosedDate` date NOT NULL,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `from` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `resolution` mediumtext NOT NULL,
+ `resolvedBy` varchar(30) NOT NULL,
+ `activateBy` varchar(30) NOT NULL,
+ `activateDate` date NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` date NOT NULL,
+ `cancelBy` varchar(30) NOT NULL,
+ `cancelDate` date NOT NULL,
+ `cancelReason` char(30) NOT NULL,
+ `hangupBy` varchar(30) NOT NULL,
+ `hangupDate` date NOT NULL,
+ `trackedBy` varchar(30) NOT NULL,
+ `trackedDate` date NOT NULL,
+ `assignedDate` date NOT NULL,
+ `approvedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_riskissue` (
+ `risk` mediumint(8) unsigned NOT NULL,
+ `issue` mediumint(8) unsigned NOT NULL,
+ UNIQUE KEY `risk_issue` (`risk`,`issue`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_score` (
+ `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
+ `account` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `method` varchar(30) NOT NULL,
+ `desc` varchar(250) NOT NULL DEFAULT '',
+ `before` int(11) NOT NULL DEFAULT '0',
+ `score` int(11) NOT NULL DEFAULT '0',
+ `after` int(11) NOT NULL DEFAULT '0',
+ `time` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `model` (`module`),
+ KEY `method` (`method`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_searchdict` (
+ `key` smallint(5) unsigned NOT NULL,
+ `value` char(3) NOT NULL,
+ PRIMARY KEY (`key`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_searchindex` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `objectType` char(20) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `title` text NOT NULL,
+ `content` text NOT NULL,
+ `addedDate` datetime NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `object` (`objectType`,`objectID`),
+ KEY `addedDate` (`addedDate`),
+ FULLTEXT KEY `content` (`content`),
+ FULLTEXT KEY `title` (`title`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_serverroom` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(128) NOT NULL,
+ `city` varchar(128) NOT NULL,
+ `line` varchar(20) NOT NULL,
+ `bandwidth` varchar(128) NOT NULL,
+ `provider` varchar(128) NOT NULL,
+ `owner` varchar(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_service` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `external` enum('0','1') NOT NULL DEFAULT '0',
+ `port` smallint(5) unsigned NOT NULL,
+ `entry` varchar(255) NOT NULL,
+ `deploy` varchar(255) NOT NULL,
+ `version` varchar(64) NOT NULL,
+ `color` char(7) NOT NULL,
+ `desc` mediumtext,
+ `dept` varchar(128) NOT NULL,
+ `devel` varchar(30) NOT NULL,
+ `qa` varchar(30) NOT NULL,
+ `ops` varchar(30) NOT NULL,
+ `hosts` text,
+ `softName` varchar(128) NOT NULL,
+ `softVersion` varchar(128) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `order` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_solutions` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `contents` text NOT NULL COMMENT '问题描述',
+ `support` text NOT NULL COMMENT '是否需要高层支持',
+ `measures` text NOT NULL COMMENT '解决建议',
+ `type` char(30) NOT NULL,
+ `addedBy` varchar(30) NOT NULL,
+ `addedDate` date NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_sqlview` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(90) NOT NULL,
+ `code` varchar(45) NOT NULL,
+ `sql` text NOT NULL,
+ `desc` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_stage` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `percent` varchar(255) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_stakeholder` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `objectID` mediumint(8) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `user` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `key` enum('0','1') NOT NULL,
+ `from` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ KEY `objectID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_story` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `parent` mediumint(9) NOT NULL DEFAULT '0',
+ `product` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `module` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `plan` text,
+ `source` varchar(20) NOT NULL,
+ `sourceNote` varchar(255) NOT NULL,
+ `fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `title` varchar(255) NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT 'story',
+ `category` varchar(30) NOT NULL DEFAULT 'feature',
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT '3',
+ `estimate` float unsigned NOT NULL,
+ `status` enum('','changing','active','draft','closed','reviewing') NOT NULL DEFAULT '',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released','closed') NOT NULL DEFAULT 'wait',
+ `stagedBy` char(30) NOT NULL,
+ `mailto` text,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `fromStory` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `fromVersion` smallint(6) NOT NULL DEFAULT '1',
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime NOT NULL,
+ `approvedDate` date NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `changedBy` VARCHAR(30) NOT NULL,
+ `changedDate` DATETIME NOT NULL,
+ `reviewedBy` varchar(255) NOT NULL,
+ `reviewedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `closedReason` varchar(30) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `toBug` mediumint(8) unsigned NOT NULL,
+ `childStories` varchar(255) NOT NULL,
+ `linkStories` varchar(255) NOT NULL,
+ `linkRequirements` varchar(255) NOT NULL,
+ `duplicateStory` mediumint(8) unsigned NOT NULL,
+ `version` smallint(6) NOT NULL DEFAULT '1',
+ `storyChanged` enum('0','1') NOT NULL DEFAULT '0',
+ `feedbackBy` varchar(100) NOT NULL,
+ `notifyEmail` varchar(100) NOT NULL,
+ `URChanged` enum('0','1') NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `status` (`status`),
+ KEY `assignedTo` (`assignedTo`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyestimate` (
+ `story` mediumint(9) NOT NULL,
+ `round` smallint(6) NOT NULL,
+ `estimate` text NOT NULL,
+ `average` float NOT NULL,
+ `openedBy` varchar(30) NOT NULL,
+ `openedDate` datetime NOT NULL,
+ UNIQUE KEY `story` (`story`,`round`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyreview` (
+ `story` mediumint(9) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `reviewer` varchar(30) NOT NULL,
+ `result` varchar(30) NOT NULL,
+ `reviewDate` datetime NOT NULL,
+ UNIQUE KEY `story` (`story`,`version`,`reviewer`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyspec` (
+ `story` mediumint(9) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `spec` mediumtext NOT NULL,
+ `verify` mediumtext NOT NULL,
+ UNIQUE KEY `story` (`story`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storystage` (
+ `story` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `stage` varchar(50) NOT NULL,
+ `stagedBy` char(30) NOT NULL,
+ UNIQUE KEY `story_branch` (`story`,`branch`),
+ KEY `story` (`story`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_suitecase` (
+ `suite` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `case` mediumint(8) unsigned NOT NULL,
+ `version` smallint(5) unsigned NOT NULL,
+ UNIQUE KEY `suitecase` (`suite`,`case`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_task` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `parent` mediumint(8) NOT NULL DEFAULT '0',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `module` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `design` mediumint(8) unsigned NOT NULL,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `storyVersion` smallint(6) NOT NULL DEFAULT '1',
+ `designVersion` smallint(6) unsigned NOT NULL,
+ `fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `fromIssue` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `feedback` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `mode` varchar(10) NOT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `estimate` float unsigned NOT NULL,
+ `consumed` float unsigned NOT NULL,
+ `left` float unsigned NOT NULL,
+ `deadline` date NOT NULL,
+ `status` enum('wait','doing','done','pause','cancel','closed') NOT NULL DEFAULT 'wait',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `mailto` text,
+ `desc` mediumtext NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `openedBy` varchar(30) NOT NULL,
+ `openedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `estStarted` date NOT NULL,
+ `realStarted` datetime NOT NULL,
+ `finishedBy` varchar(30) NOT NULL,
+ `finishedDate` datetime NOT NULL,
+ `finishedList` text NOT NULL,
+ `canceledBy` varchar(30) NOT NULL,
+ `canceledDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `planDuration` int(11) NOT NULL,
+ `realDuration` int(11) NOT NULL,
+ `closedReason` varchar(30) NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `mr` mediumint(8) unsigned NOT NULL,
+ `entry` varchar(255) NOT NULL,
+ `lines` varchar(10) NOT NULL,
+ `v1` varchar(40) NOT NULL,
+ `v2` varchar(40) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ KEY `execution` (`execution`),
+ KEY `story` (`story`),
+ KEY `parent` (`parent`),
+ KEY `assignedTo` (`assignedTo`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_taskestimate` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `date` date NOT NULL,
+ `left` float unsigned NOT NULL DEFAULT '0',
+ `consumed` float unsigned NOT NULL,
+ `account` char(30) NOT NULL DEFAULT '',
+ `work` text,
+ PRIMARY KEY (`id`),
+ KEY `task` (`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_taskspec` (
+ `task` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `estStarted` date NOT NULL,
+ `deadline` date NOT NULL,
+ UNIQUE KEY `task` (`task`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_team` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `root` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `type` enum('project','task','execution') NOT NULL DEFAULT 'project',
+ `account` char(30) NOT NULL DEFAULT '',
+ `role` char(30) NOT NULL DEFAULT '',
+ `position` varchar(30) NOT NULL,
+ `limited` char(8) NOT NULL DEFAULT 'no',
+ `join` date NOT NULL DEFAULT '0000-00-00',
+ `days` smallint(5) unsigned NOT NULL,
+ `hours` float(3,1) unsigned NOT NULL DEFAULT '0.0',
+ `estimate` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
+ `consumed` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
+ `left` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
+ `order` tinyint(3) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `team` (`root`,`type`,`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `tasks` varchar(255) NOT NULL,
+ `builds` varchar(255) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `owner` char(30) NOT NULL,
+ `members` text NOT NULL,
+ `stories` text NOT NULL,
+ `bugs` text NOT NULL,
+ `cases` text NOT NULL,
+ `report` text NOT NULL,
+ `objectType` varchar(20) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testresult` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `run` mediumint(8) unsigned NOT NULL,
+ `case` mediumint(8) unsigned NOT NULL,
+ `version` smallint(5) unsigned NOT NULL,
+ `job` mediumint(8) unsigned NOT NULL,
+ `compile` mediumint(8) unsigned NOT NULL,
+ `caseResult` char(30) NOT NULL,
+ `stepResults` text NOT NULL,
+ `lastRunner` varchar(30) NOT NULL,
+ `date` datetime NOT NULL,
+ `duration` float NOT NULL,
+ `xml` text NOT NULL,
+ `deploy` mediumint(8) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `case` (`case`),
+ KEY `version` (`version`),
+ KEY `run` (`run`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testrun` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `case` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `version` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `assignedTo` char(30) NOT NULL DEFAULT '',
+ `lastRunner` varchar(30) NOT NULL,
+ `lastRunDate` datetime NOT NULL,
+ `lastRunResult` char(30) NOT NULL,
+ `status` char(30) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `task` (`task`,`case`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testsuite` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `order` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `addedBy` char(30) NOT NULL,
+ `addedDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testtask` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `name` char(90) NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `build` char(30) NOT NULL,
+ `type` varchar(255) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `realFinishedDate` datetime NOT NULL,
+ `mailto` text,
+ `desc` mediumtext NOT NULL,
+ `report` text NOT NULL,
+ `status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait',
+ `testreport` mediumint(8) unsigned NOT NULL,
+ `auto` varchar(10) NOT NULL DEFAULT 'no',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `build` (`build`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_todo` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `date` date NOT NULL,
+ `begin` smallint(4) unsigned zerofill NOT NULL,
+ `end` smallint(4) unsigned zerofill NOT NULL,
+ `feedback` mediumint(8) unsigned NOT NULL,
+ `type` char(15) NOT NULL,
+ `cycle` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `idvalue` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `pri` tinyint(3) unsigned NOT NULL,
+ `name` char(150) NOT NULL,
+ `desc` mediumtext NOT NULL,
+ `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
+ `private` tinyint(1) NOT NULL,
+ `config` varchar(255) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime NOT NULL,
+ `finishedBy` varchar(30) NOT NULL DEFAULT '',
+ `finishedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `assignedTo` (`assignedTo`),
+ KEY `finishedBy` (`finishedBy`),
+ KEY `date` (`date`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_traincategory` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(30) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) NOT NULL,
+ `order` mediumint(8) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `path` (`path`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_traincontents` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `code` varchar(50) NOT NULL,
+ `course` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `name` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `path` char(255) NOT NULL DEFAULT '',
+ `desc` text NOT NULL,
+ `order` mediumint(8) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` tinyint(1) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_traincourse` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `code` varchar(50) NOT NULL,
+ `category` mediumint(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `status` varchar(10) NOT NULL,
+ `teacher` varchar(30) NOT NULL DEFAULT '',
+ `desc` mediumtext NOT NULL,
+ `createdBy` varchar(255) NOT NULL,
+ `createdDate` date NOT NULL,
+ `editedBy` varchar(255) NOT NULL,
+ `editedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_trainplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `place` varchar(255) NOT NULL,
+ `trainee` text NOT NULL,
+ `lecturer` varchar(20) NOT NULL,
+ `type` enum('inside','outside') NOT NULL DEFAULT 'inside',
+ `status` varchar(20) NOT NULL,
+ `summary` mediumtext NOT NULL,
+ `createdBy` char(30) DEFAULT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_trainrecords` (
+ `user` char(30) NOT NULL,
+ `objectId` mediumint(8) unsigned NOT NULL,
+ `objectType` varchar(10) NOT NULL,
+ `status` varchar(10) NOT NULL,
+ PRIMARY KEY (`user`,`objectId`,`objectType`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_trip` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` enum('trip','egress') NOT NULL DEFAULT 'trip',
+ `customers` varchar(20) NOT NULL,
+ `name` char(30) NOT NULL,
+ `desc` text NOT NULL,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `start` time NOT NULL,
+ `finish` time NOT NULL,
+ `from` char(50) NOT NULL,
+ `to` char(50) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_user` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `company` mediumint(8) unsigned NOT NULL,
+ `type` char(30) NOT NULL DEFAULT 'inside',
+ `dept` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `account` char(30) NOT NULL DEFAULT '',
+ `password` char(32) NOT NULL DEFAULT '',
+ `role` char(10) NOT NULL DEFAULT '',
+ `realname` varchar(100) NOT NULL DEFAULT '',
+ `pinyin` varchar(255) NOT NULL DEFAULT '',
+ `nickname` char(60) NOT NULL DEFAULT '',
+ `commiter` varchar(100) NOT NULL,
+ `avatar` text NOT NULL,
+ `birthday` date NOT NULL DEFAULT '0000-00-00',
+ `gender` enum('f','m') NOT NULL DEFAULT 'f',
+ `email` char(90) NOT NULL DEFAULT '',
+ `skype` char(90) NOT NULL DEFAULT '',
+ `qq` char(20) NOT NULL DEFAULT '',
+ `mobile` char(11) NOT NULL DEFAULT '',
+ `phone` char(20) NOT NULL DEFAULT '',
+ `weixin` varchar(90) NOT NULL DEFAULT '',
+ `dingding` varchar(90) NOT NULL DEFAULT '',
+ `slack` varchar(90) NOT NULL DEFAULT '',
+ `whatsapp` varchar(90) NOT NULL DEFAULT '',
+ `address` char(120) NOT NULL DEFAULT '',
+ `zipcode` char(10) NOT NULL DEFAULT '',
+ `nature` text NOT NULL,
+ `analysis` text NOT NULL,
+ `strategy` text NOT NULL,
+ `join` date NOT NULL DEFAULT '0000-00-00',
+ `visits` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite',
+ `ip` char(15) NOT NULL DEFAULT '',
+ `last` int(10) unsigned NOT NULL DEFAULT '0',
+ `fails` tinyint(5) NOT NULL DEFAULT '0',
+ `locked` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `feedback` enum('0','1') NOT NULL DEFAULT '0',
+ `ranzhi` char(30) NOT NULL DEFAULT '',
+ `ldap` char(30) NOT NULL,
+ `score` int(11) NOT NULL DEFAULT '0',
+ `scoreLevel` int(11) NOT NULL DEFAULT '0',
+ `resetToken` varchar(50) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `clientStatus` enum('online','away','busy','offline','meeting') NOT NULL DEFAULT 'offline',
+ `clientLang` varchar(10) NOT NULL DEFAULT 'zh-cn',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `account` (`account`),
+ KEY `dept` (`dept`),
+ KEY `email` (`email`),
+ KEY `commiter` (`commiter`),
+ KEY `deleted` (`deleted`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usercontact` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `listName` varchar(60) NOT NULL,
+ `userList` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usergroup` (
+ `account` char(30) NOT NULL DEFAULT '',
+ `group` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `project` text NOT NULL,
+ UNIQUE KEY `account` (`account`,`group`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_userquery` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `title` varchar(90) NOT NULL,
+ `form` text NOT NULL,
+ `sql` text NOT NULL,
+ `shortcut` enum('0','1') NOT NULL DEFAULT '0',
+ `common` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `module` (`module`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usertpl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `title` varchar(150) NOT NULL,
+ `content` text NOT NULL,
+ `public` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_userview` (
+ `account` char(30) NOT NULL,
+ `programs` mediumtext NOT NULL,
+ `products` mediumtext NOT NULL,
+ `projects` mediumtext NOT NULL,
+ `sprints` mediumtext NOT NULL,
+ UNIQUE KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_vm` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `hostID` int(10) unsigned NOT NULL DEFAULT '0',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `osCategory` varchar(50) NOT NULL DEFAULT '',
+ `osType` varchar(50) NOT NULL DEFAULT '',
+ `osArch` varchar(50) NOT NULL DEFAULT '',
+ `osLang` varchar(50) NOT NULL DEFAULT '',
+ `osCpu` tinyint(2) NOT NULL DEFAULT 0,
+ `osMemory` smallint(6) NOT NULL DEFAULT 0,
+ `osDisk` smallint(6) NOT NULL DEFAULT 0,
+ `status` varchar(50) NOT NULL DEFAULT '',
+ `destroyAt` datetime DEFAULT NULL,
+ `macAddress` varchar(255) NOT NULL DEFAULT '',
+ `workspace` varchar(255) NOT NULL DEFAULT '',
+ `templateID` int(10) unsigned NOT NULL DEFAULT '0',
+ `baseImageID` int(10) unsigned NOT NULL DEFAULT '0',
+ `baseImagePath` varchar(255) NOT NULL DEFAULT '',
+ `desc` varchar(255) NOT NULL DEFAULT '',
+ `heatbeat` datetime DEFAULT NULL,
+ `vncPort` int(10) NOT NULL DEFAULT 0,
+ `instance` varchar(255) NOT NULL DEFAULT '',
+ `eip` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `public` varchar(50) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_vmtemplate` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `hostID` int(10) unsigned NOT NULL DEFAULT '0',
+ `templateName` varchar(255) NOT NULL DEFAULT '',
+ `osType` varchar(50) NOT NULL DEFAULT '',
+ `osCategory` varchar(50) NOT NULL DEFAULT '',
+ `osVersion` varchar(50) NOT NULL DEFAULT '',
+ `osLang` varchar(50) NOT NULL,
+ `cpuCoreNum` smallint(4) NOT NULL DEFAULT 0,
+ `memorySize` int NOT NULL DEFAULT 0,
+ `diskSize` int NOT NULL DEFAULT 0,
+ `osArch` varchar(50) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_webhook` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(15) NOT NULL DEFAULT 'default',
+ `name` varchar(50) NOT NULL,
+ `url` varchar(255) NOT NULL,
+ `domain` varchar(255) NOT NULL,
+ `secret` varchar(255) NOT NULL,
+ `contentType` varchar(30) NOT NULL DEFAULT 'application/json',
+ `sendType` enum('sync','async') NOT NULL DEFAULT 'sync',
+ `products` text NOT NULL,
+ `executions` text NOT NULL,
+ `params` varchar(100) NOT NULL,
+ `actions` text NOT NULL,
+ `desc` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_weeklyreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `weekStart` date NOT NULL,
+ `pv` float(9,2) NOT NULL,
+ `ev` float(9,2) NOT NULL,
+ `ac` float(9,2) NOT NULL,
+ `sv` float(9,2) NOT NULL,
+ `cv` float(9,2) NOT NULL,
+ `staff` smallint(5) unsigned NOT NULL,
+ `progress` varchar(255) NOT NULL,
+ `workload` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `week` (`project`,`weekStart`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workestimation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `scale` decimal(10,2) unsigned NOT NULL,
+ `productivity` decimal(10,2) unsigned NOT NULL,
+ `duration` decimal(10,2) unsigned NOT NULL,
+ `unitLaborCost` decimal(10,2) unsigned NOT NULL,
+ `totalLaborCost` decimal(10,2) unsigned NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `dayHour` decimal(10,2) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflow` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `parent` varchar(30) NOT NULL,
+ `child` varchar(30) NOT NULL,
+ `type` varchar(10) NOT NULL DEFAULT 'flow',
+ `navigator` varchar(10) NOT NULL,
+ `app` varchar(20) NOT NULL,
+ `position` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `table` varchar(50) NOT NULL,
+ `name` varchar(30) NOT NULL,
+ `titleField` varchar(30) NOT NULL,
+ `contentField` text NOT NULL,
+ `flowchart` text NOT NULL,
+ `js` text NOT NULL,
+ `css` text NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ `buildin` tinyint(1) unsigned NOT NULL,
+ `administrator` text NOT NULL,
+ `desc` text NOT NULL,
+ `version` varchar(10) NOT NULL DEFAULT '1.0',
+ `status` varchar(10) NOT NULL DEFAULT 'wait',
+ `approval` enum('enabled', 'disabled') NOT NULL DEFAULT 'disabled',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`app`,`module`,`vision`),
+ KEY `type` (`type`),
+ KEY `app` (`app`),
+ KEY `module` (`module`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowaction` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `action` varchar(50) NOT NULL,
+ `method` varchar(50) NOT NULL,
+ `name` varchar(50) NOT NULL,
+ `type` enum('single','batch') NOT NULL DEFAULT 'single',
+ `batchMode` enum('same','different') NOT NULL DEFAULT 'different',
+ `extensionType` varchar(10) NOT NULL DEFAULT 'override' COMMENT 'none | extend | override',
+ `open` varchar(20) NOT NULL,
+ `position` enum('menu','browseandview','browse','view') NOT NULL DEFAULT 'browseandview',
+ `layout` char(20) NOT NULL,
+ `show` enum('dropdownlist','direct') NOT NULL DEFAULT 'dropdownlist',
+ `order` smallint(5) unsigned NOT NULL,
+ `buildin` tinyint(1) unsigned NOT NULL,
+ `role` varchar(10) NOT NULL DEFAULT 'custom',
+ `virtual` tinyint(1) unsigned NOT NULL,
+ `conditions` text NOT NULL,
+ `verifications` text NOT NULL,
+ `hooks` text NOT NULL,
+ `linkages` text NOT NULL,
+ `js` text NOT NULL,
+ `css` text NOT NULL,
+ `toList` char(255) NOT NULL,
+ `blocks` text NOT NULL,
+ `desc` text NOT NULL,
+ `status` varchar(10) NOT NULL DEFAULT 'enable',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`module`,`action`,`vision`),
+ KEY `module` (`module`),
+ KEY `action` (`action`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB AUTO_INCREMENT=190 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowdatasource` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` enum('system','sql','func','option','lang','category') NOT NULL DEFAULT 'option',
+ `name` varchar(30) NOT NULL,
+ `code` varchar(30) NOT NULL,
+ `datasource` text NOT NULL,
+ `view` varchar(20) NOT NULL,
+ `keyField` varchar(50) NOT NULL,
+ `valueField` varchar(50) NOT NULL,
+ `buildin` tinyint(1) unsigned NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `type` (`type`)
+) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowfield` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `field` varchar(50) NOT NULL,
+ `type` varchar(20) NOT NULL DEFAULT 'varchar',
+ `length` varchar(10) NOT NULL,
+ `name` varchar(50) NOT NULL,
+ `control` varchar(20) NOT NULL,
+ `expression` text NOT NULL,
+ `options` text NOT NULL,
+ `default` varchar(100) NOT NULL,
+ `rules` varchar(255) NOT NULL,
+ `placeholder` varchar(100) NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ `searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `exportOrder` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `canExport` enum('0','1') NOT NULL DEFAULT '0',
+ `canSearch` enum('0','1') NOT NULL DEFAULT '0',
+ `isValue` enum('0','1') NOT NULL DEFAULT '0',
+ `readonly` enum('0','1') NOT NULL DEFAULT '0',
+ `buildin` tinyint(1) unsigned NOT NULL,
+ `role` varchar(10) NOT NULL DEFAULT 'custom',
+ `desc` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`module`,`field`),
+ KEY `module` (`module`),
+ KEY `field` (`field`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB AUTO_INCREMENT=360 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowlabel` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `action` varchar(30) NOT NULL DEFAULT 'browse',
+ `code` varchar(30) NOT NULL,
+ `label` varchar(255) NOT NULL,
+ `params` text NOT NULL,
+ `orderBy` text NOT NULL,
+ `order` tinyint(3) NOT NULL,
+ `buildin` tinyint(1) unsigned NOT NULL,
+ `role` varchar(10) NOT NULL DEFAULT 'custom',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `module` (`module`)
+) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowlayout` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `action` varchar(50) NOT NULL,
+ `field` varchar(50) NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ `width` smallint(5) NOT NULL,
+ `position` text NOT NULL,
+ `readonly` enum('0','1') NOT NULL DEFAULT '0',
+ `mobileShow` enum('0','1') NOT NULL DEFAULT '1',
+ `summary` varchar(20) NOT NULL,
+ `defaultValue` text NOT NULL,
+ `layoutRules` varchar(255) NOT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`module`,`action`,`field`,`vision`),
+ KEY `module` (`module`),
+ KEY `action` (`action`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowlinkdata` (
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `linkedType` varchar(30) NOT NULL,
+ `linkedID` mediumint(8) unsigned NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ UNIQUE KEY `unique` (`objectType`,`objectID`,`linkedType`,`linkedID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowrelation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `prev` varchar(30) NOT NULL,
+ `next` varchar(30) NOT NULL,
+ `field` varchar(50) NOT NULL,
+ `actions` varchar(20) NOT NULL,
+ `actionCodes` text NOT NULL,
+ `buildin` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowrelationlayout` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `prev` varchar(30) NOT NULL,
+ `next` varchar(30) NOT NULL,
+ `action` varchar(50) NOT NULL,
+ `field` varchar(50) NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`prev`,`next`,`action`,`field`),
+ KEY `prev` (`prev`),
+ KEY `next` (`next`),
+ KEY `action` (`action`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL COMMENT 'module name',
+ `name` varchar(100) NOT NULL COMMENT 'report name',
+ `type` enum('pie','line','bar') NOT NULL DEFAULT 'pie' COMMENT 'report type',
+ `countType` enum('sum','count') NOT NULL DEFAULT 'sum' COMMENT 'report count method',
+ `displayType` enum('value','percent') NOT NULL DEFAULT 'value' COMMENT 'report display method',
+ `dimension` varchar(130) NOT NULL COMMENT 'dimension field code of zt_workflowfield',
+ `fields` text NOT NULL COMMENT 'count fileds code of zt_workflowfield,use comma split',
+ `order` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowrule` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` enum('system','regex','func') NOT NULL DEFAULT 'regex',
+ `name` varchar(30) NOT NULL,
+ `rule` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `type` (`type`)
+) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowsql` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `field` varchar(50) NOT NULL,
+ `action` varchar(50) NOT NULL,
+ `sql` text NOT NULL,
+ `vars` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `module` (`module`),
+ KEY `field` (`field`),
+ KEY `action` (`action`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowversion` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `version` varchar(10) NOT NULL,
+ `fields` text NOT NULL,
+ `actions` text NOT NULL,
+ `layouts` text NOT NULL,
+ `sqls` text NOT NULL,
+ `labels` text NOT NULL,
+ `table` text NOT NULL,
+ `datas` text NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `moduleversion` (`module`,`version`),
+ KEY `module` (`module`),
+ KEY `version` (`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_zoutput` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `activity` mediumint(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `content` mediumtext NOT NULL,
+ `optional` char(20) NOT NULL,
+ `tailorNorm` varchar(255) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `order` mediumint(8) DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=130 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_dayactions` AS SELECT
+ 1 AS `actions`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daybugopen` AS SELECT
+ 1 AS `bugopen`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daybugresolve` AS SELECT
+ 1 AS `bugresolve`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_dayeffort` AS SELECT
+ 1 AS `consumed`,
+ 1 AS `date`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daystoryclose` AS SELECT
+ 1 AS `storyclose`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daystoryopen` AS SELECT
+ 1 AS `storyopen`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daytaskfinish` AS SELECT
+ 1 AS `taskfinish`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_daytaskopen` AS SELECT
+ 1 AS `taskopen`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_dayuserlogin` AS SELECT
+ 1 AS `userlogin`,
+ 1 AS `day`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_executionsummary` AS SELECT
+ 1 AS `execution`,
+ 1 AS `estimate`,
+ 1 AS `consumed`,
+ 1 AS `left`,
+ 1 AS `number`,
+ 1 AS `undone`,
+ 1 AS `totalReal`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_productbugs` AS SELECT
+ 1 AS `product`,
+ 1 AS `bugs`,
+ 1 AS `resolutions`,
+ 1 AS `seriousBugs`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_productstories` AS SELECT
+ 1 AS `product`,
+ 1 AS `stories`,
+ 1 AS `undone`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_projectbugs` AS SELECT
+ 1 AS `execution`,
+ 1 AS `bugs`,
+ 1 AS `resolutions`,
+ 1 AS `seriousBugs`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_projectstories` AS SELECT
+ 1 AS `execution`,
+ 1 AS `stories`,
+ 1 AS `undone`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_projectsummary` AS SELECT
+ 1 AS `project`,
+ 1 AS `estimate`,
+ 1 AS `consumed`,
+ 1 AS `left`,
+ 1 AS `number`,
+ 1 AS `undone`,
+ 1 AS `totalReal`*/;
+SET character_set_client = @saved_cs_client;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `ztv_projectteams` AS SELECT
+ 1 AS `execution`,
+ 1 AS `teams`*/;
+SET character_set_client = @saved_cs_client;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_10`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_10` AS select `zt_build`.`id` AS `id`,`zt_build`.`name` AS `name` from `zt_build` where (`zt_build`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_11`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_11` AS select `zt_module`.`id` AS `id`,`zt_module`.`name` AS `name` from `zt_module` where (`zt_module`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_12`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_12` AS select `zt_productplan`.`id` AS `id`,`zt_productplan`.`title` AS `title` from `zt_productplan` where (`zt_productplan`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_4`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_4` AS select `zt_story`.`id` AS `id`,`zt_story`.`title` AS `title` from `zt_story` where (`zt_story`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_41`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_41` AS select `zt_case`.`id` AS `id`,`zt_case`.`title` AS `title` from `zt_case` where (`zt_case`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_46`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_46` AS select `zt_task`.`id` AS `id`,`zt_task`.`name` AS `name` from `zt_task` where ((`zt_task`.`deleted` = '0') and (`zt_task`.`vision` = 'lite')) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_5`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_5` AS select `zt_task`.`id` AS `id`,`zt_task`.`name` AS `name` from `zt_task` where ((`zt_task`.`deleted` = '0') and (`zt_task`.`vision` = 'rnd')) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `view_datasource_6`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `view_datasource_6` AS select `zt_bug`.`id` AS `id`,`zt_bug`.`title` AS `title` from `zt_bug` where (`zt_bug`.`deleted` = '0') */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_dayactions`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_dayactions` AS select count(0) AS `actions`,left(`zt_action`.`date`,10) AS `day` from `zt_action` group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daybugopen`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daybugopen` AS select count(0) AS `bugopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'bug') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daybugresolve`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daybugresolve` AS select count(0) AS `bugresolve`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'bug') and (`zt_action`.`action` = 'resolved')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_dayeffort`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_dayeffort` AS select round(sum(`zt_effort`.`consumed`),1) AS `consumed`,`zt_effort`.`date` AS `date` from `zt_effort` group by `zt_effort`.`date` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daystoryclose`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daystoryclose` AS select count(0) AS `storyclose`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'story') and (`zt_action`.`action` = 'closed')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daystoryopen`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daystoryopen` AS select count(0) AS `storyopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'story') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daytaskfinish`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daytaskfinish` AS select count(0) AS `taskfinish`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'task') and (`zt_action`.`action` = 'finished')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_daytaskopen`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_daytaskopen` AS select count(0) AS `taskopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'task') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_dayuserlogin`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_dayuserlogin` AS select count(0) AS `userlogin`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'user') and (`zt_action`.`action` = 'login')) group by left(`zt_action`.`date`,10) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_executionsummary`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_executionsummary` AS select `zt_task`.`execution` AS `execution`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`execution` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_productbugs`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_productbugs` AS select `zt_bug`.`product` AS `product`,count(0) AS `bugs`,sum(if((`zt_bug`.`resolution` = ''),0,1)) AS `resolutions`,sum(if((`zt_bug`.`severity` <= 2),1,0)) AS `seriousBugs` from `zt_bug` where (`zt_bug`.`deleted` = '0') group by `zt_bug`.`product` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_productstories`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_productstories` AS select `zt_story`.`product` AS `product`,count('*') AS `stories`,sum(if((`zt_story`.`status` = 'closed'),0,1)) AS `undone` from `zt_story` where (`zt_story`.`deleted` = '0') group by `zt_story`.`product` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_projectbugs`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_projectbugs` AS select `zt_bug`.`execution` AS `execution`,count(0) AS `bugs`,sum(if((`zt_bug`.`resolution` = ''),0,1)) AS `resolutions`,sum(if((`zt_bug`.`severity` <= 2),1,0)) AS `seriousBugs` from `zt_bug` where (`zt_bug`.`deleted` = '0') group by `zt_bug`.`execution` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_projectstories`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_projectstories` AS select `t1`.`project` AS `execution`,count('*') AS `stories`,sum(if((`t2`.`status` = 'closed'),0,1)) AS `undone` from ((`zt_projectstory` `t1` left join `zt_story` `t2` on((`t1`.`story` = `t2`.`id`))) left join `zt_project` `t3` on((`t1`.`project` = `t3`.`id`))) where ((`t2`.`deleted` = '0') and (`t3`.`type` in ('sprint','stage'))) group by `t1`.`project` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_projectsummary`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_projectsummary` AS select `zt_task`.`project` AS `project`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`project` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+/*!50001 DROP VIEW IF EXISTS `ztv_projectteams`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `ztv_projectteams` AS select `zt_team`.`root` AS `execution`,count('*') AS `teams` from `zt_team` where (`zt_team`.`type` = 'execution') group by `zt_team`.`root` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
diff --git a/db/update17.6.sql b/db/update17.6.sql
index 1d60b73fd5..5f0cbf39ea 100644
--- a/db/update17.6.sql
+++ b/db/update17.6.sql
@@ -11,5 +11,7 @@ CREATE TABLE `zt_taskteam` (
PRIMARY KEY (`id`),
KEY `task` (`task`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-ALTER TABLE `zt_taskestimate` ADD `order` tinyint unsigned NULL DEFAULT '0';
+ALTER TABLE `zt_taskestimate` ADD `order` tinyint unsigned NOT NULL DEFAULT '0';
ALTER TABLE `zt_effort` ADD `order` tinyint unsigned NOT NULL DEFAULT '0' AFTER `end`;
+ALTER TABLE `zt_storyspec` ADD `files` text NOT NULL AFTER `verify`;
+ALTER TABLE `zt_block` CHANGE `block` `block` varchar(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `source`;
diff --git a/db/zentao.sql b/db/zentao.sql
index 8ed0a0d092..d5266fc5e3 100755
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -218,7 +218,7 @@ CREATE TABLE IF NOT EXISTS `zt_block` (
`type` char(30) NOT NULL,
`title` varchar(100) NOT NULL,
`source` varchar(20) NOT NULL,
- `block` varchar(20) NOT NULL,
+ `block` varchar(30) NOT NULL,
`params` text NOT NULL,
`order` tinyint(3) unsigned NOT NULL DEFAULT '0',
`grid` tinyint(3) unsigned NOT NULL DEFAULT '0',
@@ -1504,6 +1504,7 @@ CREATE TABLE IF NOT EXISTS `zt_storyspec` (
`title` varchar(255) NOT NULL,
`spec` mediumtext NOT NULL,
`verify` mediumtext NOT NULL,
+ `files` text NOT NULL,
UNIQUE KEY `story` (`story`,`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_storystage`;
diff --git a/doc/CHANGELOG b/doc/CHANGELOG
index 8b74a93caf..c65209733b 100644
--- a/doc/CHANGELOG
+++ b/doc/CHANGELOG
@@ -1,3 +1,130 @@
+2022-09-08 17.6.1
+完成的需求
+开源版:
+31896 Scrum看板列中动态加载卡片数据
+34361 需求编辑页面增加附件信息的显示
+35317 禅道可以支持腾讯云和阿里云数据库
+35436 批量创建和编辑页面保存时,增加名称必填项校验
+35475 并行多人任务完成后重新激活无法再完成
+35909 通用看板增加区域的检索标签
+36259 需求详情中的附件去掉删除操作
+36444 多人串行任务,状态为“未开始”时,可以维护自己的工时日志
+36445 多人串行任务,只有指派人可以开始任务或完成任务
+36448 多人串行任务,状态为“进行中”时,可以新增工序和成员
+36451 多人串行任务,状态为“进行中”时,可以修改工序和成员
+36452 多人串行任务,状态为“进行中”时,可以删除工序和成员
+36453 多人串行任务,状态为“已完成”时,不可以编辑工序和团队成员
+36454 多人任务,只有编辑人可以修改自己的日志
+36455 多人串行任务的状态为“进行中”,且指派人为自己时,可以编辑当前工序的工时日志
+36457 多人串行任务的状态为“已完成”,可以修改自己已经填写的工时
+36458 多人串行任务状态为已关闭或已完成时,可以激活
+36459 多人串行任务,状态为“未开始”时,可以维护工序和团队成员
+36460 多人并行任务,状态为“未开始”时,可以维护团队成员
+36461 创建和编辑多人任务团队时,预计剩余不为0
+36462 多人并行任务,状态为“进行中”时,可以修改团队成员
+36463 多人并行任务,状态为“进行中”时,可以添加团队成员
+36464 多人并行任务,状态为“进行中”时,可以删除团队成员
+36465 多人并行任务,状态为“已完成”时,不能维护团队成员
+36466 多人并行任务中,自己可以维护自己创建的日志
+36467 多人串行任务状态为“已取消”时,激活后选择继续或重新开始
+36468 多人串行任务状态为已关闭、已暂停、已取消时不能维护团队和日志
+36469 多人并行任务状态为已关闭、已暂停、已取消时不能维护团队
+36470 多人并行任务状态为已关闭、已暂停、已取消时可以维护日志
+36471 多人并行任务状态为已关闭或已完成时,可以激活
+36663 任务日志列表展示”最初预计“和”累积耗时“
+36664 多人串行任务的日志,根据团队成员的状态展示我的日志和所有日志
+36666 维护多人串行任务日志时,根据团队成员的状态判断是新增日志还是追加日志
+36678 单人任务和多人并行任务,日志页展示历史的日志和新增日志入口
+36720 通过面板二维码下载移动端时,可以自动判断当前版本匹配的移动端版本
+36723 测试单列表增加搜索功能
+36730 需求变更评审时,系统根据需求不同评审结果进行后续处理
+36783 变更需求时,附件删除操作记录版本号
+36784 需求的附件跟随版本变化
+36785 变更需求时,附件删除操作保存后再生效
+36795 权限分组的视野维护中,项目集下拉菜单支持按树状结构进行显示和选择
+36998 执行概况的燃尽图中增加延期状态的标签
+企业版:
+30912 地盘日志列表新建日志时对象与执行的展示顺序修改
+旗舰版:
+36984 实现瀑布项目总体进展统计区块
+36989 项目周报中将进度调整为本周进度
+34731 瀑布项目里评审下的基线评审列表增加删除功能
+36744 复制项目的执行的时间填写后,自动计算可用工作日
+36813 瀑布项目评审下的问题列表增加删除权限
+36839 QA质量保证计划可以在地盘待处理显示
+禅道客户端:
+35987 群成员管理列表点击成员头像或名称显示成员名片的功能
+35878 实现群成员管理列表的搜索功能
+35875 实现群管理列表的搜索功能
+35873 实现群成员管理列表中设置群主功能
+35853 实现群成员管理列表中单个移除成员的功能
+35852 实现群成员管理列表中添加成员功能
+35976 实现讨论组成员管理列表的右键菜单及功能
+35850 实现群成员管理列表
+35974 实现群管理列表的右键菜单及功能
+35848 实现群管理列表
+35986 客户端应用中增加讨论组管理的应用入口
+36496 系统默认讨论组分组不支持重命名
+36447 扩展API应用分组、排序功能优化
+36446 扩展API应用搜索功能优化
+36443 扩展API应用界面优化
+36425 扩展API应用增加介绍模块
+36090 重新规划扩展API应用分组维度
+36426 新建讨论组时可以将其增加到分组
+21476 讨论组的分组功能可以有明确的添加入口
+36030 实现在线编辑喧喧文件的功能(word文件/excel文件)
+36037 实现群管理列表按表头排序的功能
+36039 实现群成员管理列表按表头排序的功能
+修复的Bug
+23401 经典模式项目树状图下点击模块后导航错乱,点击报错
+23957 批量创建用例超过10条相关需求不显示
+24830 创建Bug页面进入维护模块页面再关闭维护模块页面后所属产品变了
+24894 待办名称过长时会将整个页面撑开
+25409 在“待处理”中添加待办后“我的待办”的保存按钮置灰
+25515 组织日志页面数据较多下滑到最下时出现2个滚动条
+25695 英文下,复选框文案没有根据个性化设置动态变化
+25904 代号关闭后,已保存的搜索条件代号被填充到了第一个搜索框中
+25942 创建项目集页面预算右侧边框样式问题
+26122 日志信息在任务列表和日志详情中不一致
+26181 产品发布下关联需求页面点击返回后二级导航缺失
+26193 输入两次不同密码后强度校验了md5值
+26235 展开收起模块树会导致Bug标题显示不出来
+26298 项目集日期超出父项目集起止日期时提示信息优化
+26412 选择某个研发需求点击移除已选项数量仍然是一项
+26466 经典模式升级全新模式弱密码设置仍跳转重置密码界面
+26469 项目下的执行列表没有显示已延期
+26551 产品下未完成的项目列表表统计错误
+26619 创建测试任务时第2条软件需求的日程规划未显示“同上”
+26622 创建任务选择日期后,同上没有隐藏掉
+26632 专业研发看板/scrum看板下创建测试任务页面样式问题
+26646 删除附件时页面全局刷新了
+26648 发布时选了项目团队成员,不在这个项目的人也能收到通知
+26659 点击动态中的设计名称,在设计详情页返回后提示无项目权限
+26660 项目列表中人数统计与团队人数不一致
+26670 编辑项目页面选择计划起止日期时页面抖动
+26681 批量编辑用户页面密码输入位置问题
+26687 创建测试任务时,删除需求列表的第一行仍显示同上复选框
+26715 新建项目时切换顶级项目集预算未刷新
+26724 未关闭标签下无数据
+26725 编辑任务时仍能选到已关闭的迭代
+26758 编辑任务中相关研发需求下拉框显示不友好
+26842 测试单再关联新的用例后,已生成的测试报告中的统计信息被影响
+26936 项目列表无法根据状态搜索
+26963 执行看板中的需求无法拖动
+26971 权限分组视野中维护可访问项目集后不生效
+26994 多分支产品,在列表批量修改计划,数据库存储有逗号,导致按计划排序有问题
+27007 年度统计没有所有用户选项
+27020 在选择项目集创建项目时“关联产品”项没有添加必填项标识
+27034 点击执行树状图下的相关用例后,二级导航不显示了
+27068 编辑用例时,所属模块和相关研发需求的判断问题
+27135 点击卡片更多操作已归档卡片展示未收起
+27186 研发需求或者用户需求中点击取消相关用户需求或相关研发需求后页面显示“删除中”
+27192 创建测试类型任务页面截止时间小于预计开始时没有校验
+27258 编辑模块点击保存时希望不要弹出新窗口提醒
+26082 勾选设置的初始化会议状态账号一直处于会议状态
+26085 LDAP配置不对时,提示需要优化
+26207 修复了会话新建分组时无法输入中文的问题
+
2022-08-25 17.6
完成的需求
开源版:
diff --git a/extension/lite/story/ext/view/edit.html.php b/extension/lite/story/ext/view/edit.html.php
index 9f850c9087..aea99f0771 100644
--- a/extension/lite/story/ext/view/edit.html.php
+++ b/extension/lite/story/ext/view/edit.html.php
@@ -86,7 +86,7 @@
attatch;?>
status) !== false ? true : false;?>
- fetch('file', 'printFiles', array('files' => $files, 'fieldset' => 'false', 'object' => $story, 'method' => 'edit', 'showDelete' => $canChangeFile));?>
+ fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'false', 'object' => $story, 'method' => 'edit', 'showDelete' => $canChangeFile));?>
fetch('file', 'buildform') : '';?>
diff --git a/extension/lite/story/ext/view/view.html.php b/extension/lite/story/ext/view/view.html.php
index c002b4c445..fb971c4d9f 100644
--- a/extension/lite/story/ext/view/view.html.php
+++ b/extension/lite/story/ext/view/view.html.php
@@ -69,7 +69,7 @@
story->legendSpec;?>
spec;?>
- fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true', 'object' => $story));?>
+ fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true', 'object' => $story, 'method' => 'view', 'showDelete' => false));?>
createLink('action', 'comment', "objectType=story&objectID=$story->id");
diff --git a/module/action/model.php b/module/action/model.php
index 9fd4a46593..53b199d25c 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -332,12 +332,20 @@ class actionModel extends model
->where("objectType IN('project', 'testtask', 'build')")
->andWhere('project')->eq((int)$objectID)
->fi()
+ ->beginIF($objectType == 'story')
+ ->where('objectType')->in('story,requirement')
+ ->andWhere('objectID')->eq((int)$objectID)
+ ->fi()
+ ->beginIF($objectType == 'case')
+ ->where('objectType')->in('case,testcase')
+ ->andWhere('objectID')->eq((int)$objectID)
+ ->fi()
->beginIF($objectType == 'module')
->where('objectType')->eq($objectType)
->andWhere('((action')->ne('deleted')->andWhere('objectID')->eq((int)$objectID)->markRight(1)
->orWhere('(action')->eq('deleted')->andWhere('objectID')->in($modules)->markRight(1)->markRight(1)
->fi()
- ->beginIF($objectType != 'project' and $objectType != 'module')
+ ->beginIF(strpos('project,case,story,module', $objectType) === false)
->where('objectType')->eq($objectType)
->andWhere('objectID')->eq((int)$objectID)
->fi()
@@ -1698,6 +1706,7 @@ class actionModel extends model
$fieldName = $history->field;
$history->fieldLabel = (isset($this->lang->$objectType) && isset($this->lang->$objectType->$fieldName)) ? $this->lang->$objectType->$fieldName : $fieldName;
if($objectType == 'module') $history->fieldLabel = $this->lang->tree->$fieldName;
+ if($fieldName == 'fileName') $history->fieldLabel = $this->lang->file->$fieldName;
if(($length = strlen($history->fieldLabel)) > $maxLength) $maxLength = $length;
$history->diff ? $historiesWithDiff[] = $history : $historiesWithoutDiff[] = $history;
}
diff --git a/module/block/control.php b/module/block/control.php
index c078c7a1bc..668d64ac3a 100755
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -935,8 +935,9 @@ class block extends control
$current = zget($weeks, $monday, '');
$current = substr($current, 0, -11) . substr($current, -6);
- $project->pv = $this->weekly->getPV($projectID, $today);
- $project->ev = $this->weekly->getEV($projectID, $today);
+ $PVEV = $this->weekly->getPVEV($projectID, $today);
+ $project->pv = $PVEV['PV'];
+ $project->ev = $PVEV['EV'];
$project->ac = $this->weekly->getAC($projectID, $today);
$project->sv = $this->weekly->getSV($project->ev, $project->pv);
$project->cv = $this->weekly->getCV($project->ev, $project->ac);
@@ -1200,14 +1201,39 @@ class block extends control
$this->weekly->save($this->session->project, $date);
- $this->view->pv = (float)$this->weekly->getPV($this->session->project, $today);
- $this->view->ev = (float)$this->weekly->getEV($this->session->project, $today);
+ $PVEV = $this->weekly->getPVEV($this->session->project, $today);
+ $this->view->pv = (float)$PVEV['PV'];
+ $this->view->ev = (float)$PVEV['EV'];
$this->view->ac = (float)$this->weekly->getAC($this->session->project, $today);
$this->view->sv = $this->weekly->getSV($this->view->ev, $this->view->pv);
$this->view->cv = $this->weekly->getCV($this->view->ev, $this->view->ac);
+ $progress = !empty($this->view->pv) ? floor($this->view->ac / $this->view->pv * 1000) / 1000 * 100 : 0;
+ $this->view->progress = $progress > 100 ? 100 : $progress;
$this->view->current = $current;
- $this->view->progress = !empty($this->view->pv) ? floor($this->view->ac / $this->view->pv * 1000) / 1000 * 100 : 0;
+ }
+
+ /**
+ * Print waterfall general report block.
+ *
+ * @access public
+ * @return void
+ */
+ public function printWaterfallGeneralReportBlock()
+ {
+ $this->app->loadLang('programplan');
+ $this->loadModel('project');
+ $this->loadModel('weekly');
+
+ $data = $this->project->getWaterfallPVEVAC($this->session->project);
+ $this->view->pv = (float)$data['PV'];
+ $this->view->ev = (float)$data['EV'];
+ $this->view->ac = (float)$data['AC'];
+ $this->view->sv = $this->weekly->getSV($this->view->ev, $this->view->pv);
+ $this->view->cv = $this->weekly->getCV($this->view->ev, $this->view->ac);
+
+ $progress = !empty($this->view->pv) ? floor($this->view->ac / $this->view->pv * 1000) / 1000 * 100 : 0;
+ $this->view->progress = $progress > 100 ? 100 : $progress;
}
/**
diff --git a/module/block/model.php b/module/block/model.php
index 3086c24bfb..97d52b15b3 100644
--- a/module/block/model.php
+++ b/module/block/model.php
@@ -656,18 +656,29 @@ class blockModel extends model
* Get waterfall project report pararms.
*
* @access public
- * @return string
+ * @return bool
*/
public function getWaterfallReportParams()
{
return false;
}
+ /**
+ * Get waterfall general report params.
+ *
+ * @access public
+ * @return bool
+ */
+ public function getWaterfallGeneralReportParams()
+ {
+ return false;
+ }
+
/**
* Get project estimate pararms.
*
* @access public
- * @return string
+ * @return bool
*/
public function getWaterfallEstimateParams()
{
diff --git a/module/block/view/waterfallgeneralreportblock.html.php b/module/block/view/waterfallgeneralreportblock.html.php
new file mode 100644
index 0000000000..4989d3373f
--- /dev/null
+++ b/module/block/view/waterfallgeneralreportblock.html.php
@@ -0,0 +1,54 @@
+
+
+
+
+
+
project->progress;?>
+
+
+
+
+
+
+
programplan->end . ')';?>
+
+
+
+
programplan->realEnd . ')';?>
+
+
+
+
programplan->ac . ')';?>
+
+
+
+
programplan->sv . ')';?>
+
+
+
+
programplan->cv . ')';?>
+
+
+
+
+
+
diff --git a/module/bug/control.php b/module/bug/control.php
index 6834e500b6..261d4665f0 100755
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -970,17 +970,15 @@ class bug extends control
return print(js::error(dao::getError()));
}
}
- $files = $this->loadModel('file')->saveUpload('bug', $bugID);
- if(empty($files) and $this->post->uid != '' and isset($_SESSION['album']['used'][$this->post->uid])) $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]);
}
- if($this->post->comment != '' or !empty($changes) or !empty($files))
+
+ if($this->post->comment != '' or !empty($changes))
{
- $action = (!empty($changes) or !empty($files)) ? 'Edited' : 'Commented';
- $fileAction = '';
- if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
- $actionID = $this->action->create('bug', $bugID, $action, $fileAction . $this->post->comment);
+ $action = !empty($changes) ? 'Edited' : 'Commented';
+ $actionID = $this->action->create('bug', $bugID, $action, $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
+
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success', 'data' => $bugID));
$bug = $this->bug->getById($bugID);
diff --git a/module/bug/model.php b/module/bug/model.php
index 276cffcb02..593bd21324 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -687,7 +687,7 @@ class bugModel extends model
*/
public function update($bugID)
{
- $oldBug = $this->dao->select('*')->from(TABLE_BUG)->where('id')->eq((int)$bugID)->fetch();
+ $oldBug = $this->getById($bugID);
if(!empty($_POST['lastEditedDate']) and $oldBug->lastEditedDate != $this->post->lastEditedDate)
{
dao::$errors[] = $this->lang->error->editedByOther;
@@ -707,6 +707,7 @@ class bugModel extends model
->setDefault('resolvedDate', '0000-00-00 00:00:00')
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('mailto', '')
+ ->setDefault('deleteFiles', array())
->add('lastEditedDate', $now)
->setIF(strpos($this->config->bug->edit->requiredFields, 'deadline') !== false, 'deadline', $this->post->deadline)
->join('openedBuild', ',')
@@ -736,7 +737,7 @@ class bugModel extends model
->get();
$bug = $this->loadModel('file')->processImgURL($bug, $this->config->bug->editor->edit['id'], $this->post->uid);
- $this->dao->update(TABLE_BUG)->data($bug)
+ $this->dao->update(TABLE_BUG)->data($bug, 'deleteFiles')
->autoCheck()
->batchCheck($this->config->bug->edit->requiredFields, 'notempty')
->checkIF($bug->resolvedBy, 'resolution', 'notempty')
@@ -783,12 +784,12 @@ class bugModel extends model
}
if(!empty($bug->resolvedBy)) $this->loadModel('score')->create('bug', 'resolve', $bugID);
- $this->file->updateObjectID($this->post->uid, $bugID, 'bug');
if($bug->execution and $bug->status != $oldBug->status) $this->loadModel('kanban')->updateLane($bug->execution, 'bug');
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
+ $this->file->processFile4Object('bug', $oldBug, $bug);
return common::createChanges($oldBug, $bug);
}
}
diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php
index d2462c3443..1b662bb77e 100644
--- a/module/bug/view/edit.html.php
+++ b/module/bug/view/edit.html.php
@@ -72,7 +72,10 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
printExtendFields($bug, 'div', 'position=left');?>
files;?>
-
fetch('file', 'buildform');?>
+
+ fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'false', 'object' => $bug, 'method' => 'edit'));?>
+ fetch('file', 'buildform');?>
+
diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php
index 9504a43007..37b837caa2 100644
--- a/module/bug/view/view.html.php
+++ b/module/bug/view/view.html.php
@@ -73,7 +73,7 @@
?>
- fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'true', 'object' => $bug));?>
+ fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'true', 'object' => $bug, 'method' => 'view', 'showDelete' => false));?>
createLink('action', 'comment', "objectType=bug&objectID=$bug->id");
diff --git a/module/common/lang/de.php b/module/common/lang/de.php
index 3de060ef37..91ed8d50d1 100644
--- a/module/common/lang/de.php
+++ b/module/common/lang/de.php
@@ -100,7 +100,6 @@ $lang->saveSuccess = 'Gespeichert';
$lang->importSuccess = 'Gespeichert';
$lang->fail = 'Fehlgeschlagen';
$lang->addFiles = 'Hinzufügen ';
-$lang->deleteFiles = 'Anhang gelöscht ';
$lang->files = 'Datei ';
$lang->pasteText = 'Einfügen';
$lang->uploadImages = 'Hochladen';
diff --git a/module/common/lang/en.php b/module/common/lang/en.php
index c4bba1c349..4dac83fa31 100644
--- a/module/common/lang/en.php
+++ b/module/common/lang/en.php
@@ -100,7 +100,6 @@ $lang->saveSuccess = 'Saved';
$lang->importSuccess = 'Saved';
$lang->fail = 'Fail';
$lang->addFiles = 'Added Files ';
-$lang->deleteFiles = 'Deleted Files ';
$lang->files = 'Files ';
$lang->pasteText = 'Multi-line Paste';
$lang->uploadImages = 'Multi-image Upload';
diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php
index aec37d0a92..67caf6b5fd 100644
--- a/module/common/lang/fr.php
+++ b/module/common/lang/fr.php
@@ -100,7 +100,6 @@ $lang->saveSuccess = 'Sauvegardé';
$lang->importSuccess = 'Sauvé';
$lang->fail = 'Echec';
$lang->addFiles = 'Fichiers ajoutés ';
-$lang->deleteFiles = 'Pièce jointe supprimée ';
$lang->files = 'Fichiers ';
$lang->pasteText = 'Collage Multi-lignes';
$lang->uploadImages = 'Upload Multi-images';
diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php
index 0113ca2d00..dd4c0ef845 100644
--- a/module/common/lang/vi.php
+++ b/module/common/lang/vi.php
@@ -79,7 +79,6 @@ $lang->saveSuccess = 'Đã lưu';
$lang->importSuccess = 'Đã lưu';
$lang->fail = 'Thất bại';
$lang->addFiles = 'Tập tin đã thêm ';
-$lang->deleteFiles = 'Tháo ảnh ';
$lang->files = 'Files ';
$lang->pasteText = 'Dán nhiều dòng';
$lang->uploadImages = 'Tải lên nhiều ảnh';
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index 8080576b61..a27488d59e 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -100,7 +100,6 @@ $lang->saveSuccess = '保存成功';
$lang->importSuccess = '导入成功';
$lang->fail = '失败';
$lang->addFiles = '上传了附件 ';
-$lang->deleteFiles = '删除了附件 ';
$lang->files = '附件 ';
$lang->pasteText = '多项录入';
$lang->uploadImages = '多图上传 ';
diff --git a/module/file/model.php b/module/file/model.php
index d664584737..accec7aa25 100755
--- a/module/file/model.php
+++ b/module/file/model.php
@@ -46,25 +46,23 @@ class fileModel extends model
->where('objectType')->eq($objectType)
->andWhere('objectID')->eq((int)$objectID)
->andWhere('extra')->ne('editor')
- ->beginIF(strpos('story,requirement', $objectType) !== false and $extra)->andWhere('extra')->like("%,$extra,%")->fi()
- ->beginIF(strpos('story,requirement', $objectType) === false and $extra)->andWhere('extra')->eq($extra)->fi()
+ ->beginIF($extra)->andWhere('extra')->eq($extra)
->andWhere('deleted')->eq('0')
->orderBy('id')
->fetchAll('id');
foreach($files as $file)
{
- if($objectType != 'traincourse' and $objectType != 'traincontents')
- {
- $realPathName = $this->getRealPathName($file->pathname);
- $file->realPath = $this->savePath . $realPathName;
- $file->webPath = $this->webPath . $realPathName;
- }
- else
+ if($objectType == 'traincourse' or $objectType == 'traincontents')
{
$file->realPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname;
$file->webPath = 'data/course/' . $file->pathname;
+ continue;
}
+
+ $realPathName = $this->getRealPathName($file->pathname);
+ $file->realPath = $this->savePath . $realPathName;
+ $file->webPath = $this->webPath . $realPathName;
}
return $files;
@@ -81,33 +79,52 @@ class fileModel extends model
{
$file = $this->dao->findById($fileID)->from(TABLE_FILE)->fetch();
if(empty($file)) return false;
- if($file->objectType != 'traincourse' and $file->objectType != 'traincontents')
- {
- $realPathName = $this->getRealPathName($file->pathname);
- $file->realPath = $this->savePath . $realPathName;
- $file->webPath = $this->webPath . $realPathName;
- }
- else
- {
- $file->realPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname;
- $file->webPath = $this->app->getWebRoot() . 'data/course/' . $file->pathname;
- }
- if($file->objectType != 'traincourse' and $file->objectType != 'traincontents')
- {
- $realPathName = $this->getRealPathName($file->pathname);
- $file->realPath = $this->savePath . $realPathName;
- $file->webPath = $this->webPath . $realPathName;
- }
- else
+ if($file->objectType == 'traincourse' or $file->objectType == 'traincontents')
{
$file->realPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname;
$file->webPath = 'data/course/' . $file->pathname;
+
+ return $file;
}
+ $realPathName = $this->getRealPathName($file->pathname);
+ $file->realPath = $this->savePath . $realPathName;
+ $file->webPath = $this->webPath . $realPathName;
+
return $file;
}
+ /**
+ * Get files by ID list.
+ *
+ * @param int $fileIdList
+ * @access public
+ * @return array
+ */
+ public function getByIdList($fileIdList)
+ {
+ if(empty($fileIdList)) return array();
+
+ $files = $this->dao->select('*')->from(TABLE_FILE)->where('id')->in($fileIdList)->orderBy('id')->fetchAll('id');
+
+ foreach($files as $file)
+ {
+ if($file->objectType == 'traincourse' or $file->objectType == 'traincontents')
+ {
+ $file->realPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname;
+ $file->webPath = 'data/course/' . $file->pathname;
+ continue;
+ }
+
+ $realPathName = $this->getRealPathName($file->pathname);
+ $file->realPath = $this->savePath . $realPathName;
+ $file->webPath = $this->webPath . $realPathName;
+ }
+
+ return $files;
+ }
+
/**
* Save upload.
*
@@ -1121,60 +1138,33 @@ class fileModel extends model
}
/**
- * Update version of story files.
+ * Process file info for object.
*
- * @param int $storyID
- * @param int $storyVersion
- * @param array $deleteFiles
+ * @param string $objectType
+ * @param object $oldObject
+ * @param object $newObject
* @access public
* @return void
*/
- public function updateStoryFileVersion($storyID, $storyVersion, $deleteFiles = array())
+ public function processFile4Object($objectType, $oldObject, $newObject)
{
- $oldStoryVersion = $storyVersion - 1;
- $this->dao->update(TABLE_FILE)->set("extra = CONCAT(extra, '$storyVersion,')")
- ->where('objectType')->in('story,requirement')
- ->andWhere('objectID')->eq($storyID)
- ->andWhere('extra')->like("%,$oldStoryVersion,%")
- ->beginIF(!empty($deleteFiles))->andWhere('id')->notin($deleteFiles)->fi()
- ->exec();
- }
-
- /**
- * Delete story file.
- *
- * @param int $storyID
- * @param int $storyVersion
- * @param array $deleteFiles
- * @access public
- * @return void
- */
- public function deleteStoryFile($storyID, $storyVersion, $deleteFiles = array())
- {
- $deleteFileList = $this->dao->select('*')->from(TABLE_FILE)
- ->where('objectType')->in('story,requirement')
- ->andWhere('objectID')->eq($storyID)
- ->andWhere('extra')->eq(",$storyVersion,")
- ->beginIF(!empty($deleteFiles))->andWhere('id')->in($deleteFiles)->fi()
- ->fetchAll('id');
-
- if(!empty($deleteFileList))
+ $oldFiles = empty($oldObject->files) ? '' : join(',', array_keys($oldObject->files));
+ $deleteFiles = $newObject->deleteFiles;
+ if(!empty($deleteFiles))
{
- $this->dao->delete()->from(TABLE_FILE)->where('id')->in(array_keys($deleteFileList))->exec();
-
- foreach($deleteFileList as $file)
+ $this->dao->delete()->from(TABLE_FILE)->where('id')->in($deleteFiles)->exec();
+ foreach($deleteFiles as $fileID)
{
- $realPathName = $this->getRealPathName($file->pathname);
- @unlink($realPathName);
+ @unlink($oldObject->files[$fileID]->realPath);
+ $oldFiles = empty($oldFiles) ? '' : trim(str_replace(",$fileID,", ',', ",$oldFiles,"), ',');
}
}
- /* When the file is in multiple story versions, 'extra' need delete the version to be deleted. */
- $this->dao->update(TABLE_FILE)->set("extra = REPLACE(extra, '$storyVersion,', '')")
- ->where('objectType')->in('story,requirement')
- ->andWhere('objectID')->eq($storyID)
- ->andWhere('extra')->like("%,$storyVersion,%")
- ->beginIF(!empty($deleteFiles))->andWhere('id')->in($deleteFiles)->fi()
- ->exec();
+ $this->updateObjectID($this->post->uid, $oldObject->id, $objectType);
+ $addedFiles = $this->saveUpload($objectType, $oldObject->id);
+ $addedFiles = empty($addedFiles) ? '' : ',' . join(',', array_keys($addedFiles));
+
+ $newObject->files = trim($oldFiles . $addedFiles, ',');
+ $oldObject->files = join(',', array_keys($oldObject->files));
}
}
diff --git a/module/holiday/model.php b/module/holiday/model.php
index ca538c2936..e43442f049 100644
--- a/module/holiday/model.php
+++ b/module/holiday/model.php
@@ -205,21 +205,19 @@ class holidayModel extends model
$workingDays = $this->getWorkingDays($begin, $end);
$weekend = isset($this->config->project->weekend) ? $this->config->project->weekend : 2;
+ $holidaysFlip = array_flip($holidays);
+ $workingDaysFlip = array_flip($workingDays);
+
/* When the start date and end date are the same. */
+ $beginTimestamp = strtotime($begin);
if($begin == $end)
{
- if(in_array($begin, $workingDays)) return $actualDays[] = $begin;
- if(in_array($begin, $holidays)) return $actualDays;
+ if(isset($workingDaysFlip[$begin])) return $actualDays[] = $begin;
+ if(isset($holidaysFlip[$begin])) return $actualDays;
- $w = date('w', strtotime($begin));
- if($weekend == 2)
- {
- if($w == 0 or $w == 6) return $actualDays;
- }
- else
- {
- if($w == 0) return $actualDays;
- }
+ $w = date('w', $beginTimestamp);
+ if($weekend == 2 and ($w == 0 or $w == 6)) return $actualDays;
+ if($weekend != 2 and $w == 0) return $actualDays;
$actualDays[] = $begin;
return $actualDays;
@@ -227,24 +225,21 @@ class holidayModel extends model
for($i = 0; $currentDay < $end; $i ++)
{
- $currentDay = date('Y-m-d', strtotime("$begin + $i days"));
- $w = date('w', strtotime($currentDay));
+ $currentTimestamp = $beginTimestamp + ($i * 24 * 3600);
+ $currentDay = date('Y-m-d', $currentTimestamp);
- if(in_array($currentDay, $workingDays))
+ if(isset($workingDaysFlip[$currentDay]))
{
$actualDays[] = $currentDay;
continue;
}
- if(in_array($currentDay, $holidays)) continue;
- if($weekend == 2)
- {
- if($w == 0 or $w == 6) continue;
- }
- else
- {
- if($w == 0) continue;
- }
+ if(isset($holidaysFlip[$currentDay])) continue;
+
+ $w = date('w', $currentTimestamp);
+ if($weekend == 2 and ($w == 0 or $w == 6)) continue;
+ if($weekend != 2 and $w == 0) continue;
+
$actualDays[] = $currentDay;
}
@@ -266,7 +261,7 @@ class holidayModel extends model
$days = ($endTime - $beginTime) / 86400;
$dateList = array();
- for($i = 0; $i <= $days; $i ++) $dateList[] = date('Y-m-d', strtotime("+$i days", $beginTime));
+ for($i = 0; $i <= $days; $i ++) $dateList[] = date('Y-m-d', $beginTime + ($i *24 *3600));
return $dateList;
}
diff --git a/module/misc/lang/de.php b/module/misc/lang/de.php
index 65bdeaadaa..bb82e5a9d2 100644
--- a/module/misc/lang/de.php
+++ b/module/misc/lang/de.php
@@ -103,6 +103,7 @@ $lang->misc->feature->themeDesc = 'ZenTao 15.0+ a new "Youth Blue" theme
$lang->misc->feature->visionsDesc = "
The concept of interface has been added since 16.5. Users can deal with R & D affairs in [R&D] and daily office affairs in [Lite].
You can view the current interface on the avatar, and click the name of the interface to view and switch other interfaces.
";
$lang->misc->feature->visionsImage = 'theme/default/images/main/visions_en.png';
+$lang->misc->releaseDate['17.6.1'] = '2022-09-08';
$lang->misc->releaseDate['17.6'] = '2022-08-26';
$lang->misc->releaseDate['17.5'] = '2022-08-11';
$lang->misc->releaseDate['17.4'] = '2022-07-27';
@@ -188,6 +189,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
+$lang->misc->feature->all['17.6.1'][] = array('title' => "Optimized the processing logic of multi-member tasks. Fix bugs.", 'desc' => '');
$lang->misc->feature->all['17.6'][] = array('title' => "The processing logic of requirements is optimized, and the permissions of user requirements and soft requirements are split. Gantt chart supports manual drag and drop to manage task relationship. Fix bugs.", 'desc' => '');
$lang->misc->feature->all['17.5'][] = array('title' => "Provide efficient visual statistical tools. Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
$lang->misc->feature->all['17.4'][] = array('title' => "Optimization of details Page visualization and jumping page logic. Improvement of Kanban function. Optimization of document creating and editing pages. Fix bugs.", 'desc' => '');
diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php
index c7162f833d..78ccf22fe1 100644
--- a/module/misc/lang/en.php
+++ b/module/misc/lang/en.php
@@ -103,6 +103,7 @@ $lang->misc->feature->themeDesc = 'ZenTao 15.0+ a new "Youth Blue" theme
$lang->misc->feature->visionsDesc = "
The concept of interface has been added since 16.5. Users can deal with R & D affairs in [R&D] and daily office affairs in [Lite].
You can view the current interface on the avatar, and click the name of the interface to view and switch other interfaces.
";
$lang->misc->feature->visionsImage = 'theme/default/images/main/visions_en.png';
+$lang->misc->releaseDate['17.6.1'] = '2022-09-08';
$lang->misc->releaseDate['17.6'] = '2022-08-26';
$lang->misc->releaseDate['17.5'] = '2022-08-11';
$lang->misc->releaseDate['17.4'] = '2022-07-27';
@@ -188,6 +189,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
+$lang->misc->feature->all['17.6.1'][] = array('title' => "Optimized the processing logic of multi-member tasks. Fix bugs.", 'desc' => '');
$lang->misc->feature->all['17.6'][] = array('title' => "The processing logic of requirements is optimized, and the permissions of user requirements and soft requirements are split. Gantt chart supports manual drag and drop to manage task relationship. Fix bugs.", 'desc' => '');
$lang->misc->feature->all['17.5'][] = array('title' => "Provide efficient visual statistical tools. Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
$lang->misc->feature->all['17.4'][] = array('title' => "Optimization of details Page visualization and jumping page logic. Improvement of Kanban function. Optimization of document creating and editing pages. Fix bugs.", 'desc' => '');
diff --git a/module/misc/lang/fr.php b/module/misc/lang/fr.php
index 42b4ec297c..9c538829d4 100644
--- a/module/misc/lang/fr.php
+++ b/module/misc/lang/fr.php
@@ -103,6 +103,7 @@ $lang->misc->feature->themeDesc = 'ZenTao 15.0+ a new "Youth Blue" theme
$lang->misc->feature->visionsDesc = "
The concept of interface has been added since 16.5. Users can deal with R & D affairs in [R&D] and daily office affairs in [Lite].
You can view the current interface on the avatar, and click the name of the interface to view and switch other interfaces.
";
$lang->misc->feature->visionsImage = 'theme/default/images/main/visions_en.png';
+$lang->misc->releaseDate['17.6.1'] = '2022-09-08';
$lang->misc->releaseDate['17.6'] = '2022-08-26';
$lang->misc->releaseDate['17.5'] = '2022-08-11';
$lang->misc->releaseDate['17.4'] = '2022-07-27';
@@ -188,6 +189,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
+$lang->misc->feature->all['17.6.1'][] = array('title' => "Optimized the processing logic of multi-member tasks. Fix bugs.", 'desc' => '');
$lang->misc->feature->all['17.6'][] = array('title' => "The processing logic of requirements is optimized, and the permissions of user requirements and soft requirements are split. Gantt chart supports manual drag and drop to manage task relationship. Fix bugs.", 'desc' => '');
$lang->misc->feature->all['17.5'][] = array('title' => "Provide efficient visual statistical tools. Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
$lang->misc->feature->all['17.4'][] = array('title' => "Optimization of details Page visualization and jumping page logic. Improvement of Kanban function. Optimization of document creating and editing pages. Fix bugs.", 'desc' => '');
diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php
index 48fbcff978..e0beccf40e 100644
--- a/module/misc/lang/zh-cn.php
+++ b/module/misc/lang/zh-cn.php
@@ -103,6 +103,7 @@ $lang->misc->feature->themeDesc = "禅道15系列上线了全新的“
$lang->misc->feature->visionsDesc = "
从16.5开始增加了界面概念,用户可以在[研发综合界面]中处理研发事务、在[迅捷界面]处理日常办公事务。
在头像右侧即可查看当前所处界面,点击当前界面名称可查看和切换其他的界面。
";
$lang->misc->feature->visionsImage = 'theme/default/images/main/visions.png';
+$lang->misc->releaseDate['17.6.1'] = '2022-09-08';
$lang->misc->releaseDate['17.6'] = '2022-08-26';
$lang->misc->releaseDate['17.5'] = '2022-08-11';
$lang->misc->releaseDate['17.4'] = '2022-07-27';
@@ -188,6 +189,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
+$lang->misc->feature->all['17.6.1'][] = array('title' => '优化了多人任务的处理逻辑,修复Bug。', 'desc' => '');
$lang->misc->feature->all['17.6'][] = array('title' => '优化了需求的处理逻辑,拆分了用需和软需的权限。甘特图支持手动拖拽维护任务关系。修复Bug。', 'desc' => '');
$lang->misc->feature->all['17.5'][] = array('title' => '提供高效的可视化统计工具。优化禅道性能,数据库引擎从MyISAM调整为InnoDB。甘特图优化升级,旗舰版的复制项目可以复制任务等更多信息。修复Bug。', 'desc' => '');
$lang->misc->feature->all['17.4'][] = array('title' => '详情页面的视觉优化和部分页面跳转逻辑优化。看板功能完善。文档创建和编辑页面优化。修复Bug。', 'desc' => '');
diff --git a/module/my/control.php b/module/my/control.php
index 3a85807391..203b6f9933 100755
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -153,6 +153,7 @@ class my extends control
$riskCount = 0;
$reviewCount = 0;
$ncCount = 0;
+ $qaCount = 0;
$meetingCount = 0;
$isMax = $this->config->edition == 'max' ? 1 : 0;
diff --git a/module/product/config.php b/module/product/config.php
index bb08427abd..c42c6ce6bd 100644
--- a/module/product/config.php
+++ b/module/product/config.php
@@ -109,7 +109,7 @@ $config->product->all->search['fields']['createdDate'] = $lang->product->created
$config->product->all->search['fields']['createdBy'] = $lang->product->createdBy;
$config->product->all->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
-$config->product->all->search['params']['code'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
+if(!isset($config->setCode) or $config->setCode == 1) $config->product->all->search['params']['code'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->product->all->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => '');
if($config->systemMode == 'new') $config->product->all->search['params']['program'] = array('operator' => '=', 'control' => 'select', 'values' => '');
$config->product->all->search['params']['line'] = array('operator' => '=', 'control' => 'select', 'values' => '');
diff --git a/module/project/model.php b/module/project/model.php
index 33ff71ccf4..42d8d4d869 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -415,6 +415,42 @@ class projectModel extends model
return is_numeric($projectIDList) ? (empty($progressList) ? 0 : $progressList[$projectIDList]) : $progressList;
}
+ /**
+ * Get waterfall general PV and EV.
+ *
+ * @param int $projectID
+ * @access public
+ * @return array
+ */
+ public function getWaterfallPVEVAC($projectID)
+ {
+ $executions = $this->dao->select('id,begin,end,realEnd,status')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('vision')->eq($this->config->vision)->andWhere('project')->eq($projectID)->fetchAll('id');
+ $stmt = $this->dao->select('id,status,estimate,consumed,`left`,closedReason')->from(TABLE_TASK)->where('execution')->in(array_keys($executions))->andWhere("parent")->ge(0)->andWhere("deleted")->eq(0)->query();
+
+ $PV = 0;
+ $EV = 0;
+ $AC = 0;
+ while($task = $stmt->fetch())
+ {
+ if(empty($task->estimate)) continue;
+
+ $PV += $task->estimate;
+ $AC += $task->consumed;
+ if($task->status == 'done' or $task->closedReason == 'done')
+ {
+ $EV += $task->estimate;
+ }
+ else
+ {
+ $task->progress = 0;
+ if(($task->consumed + $task->left) > 0) $task->progress = round($task->consumed / ($task->consumed + $task->left), 2) * 100;
+ $EV += round($task->estimate * $task->progress / 100, 2);
+ }
+ }
+
+ return array('PV' => sprintf("%.2f", $PV), 'EV' => sprintf("%.2f", $EV), 'AC' => sprintf("%.2f", $AC));
+ }
+
/**
* Get project workhour info.
*
diff --git a/module/release/control.php b/module/release/control.php
index 1ff6c453b6..643abc4250 100644
--- a/module/release/control.php
+++ b/module/release/control.php
@@ -119,12 +119,10 @@ class release extends control
{
$changes = $this->release->update($releaseID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
- $files = $this->loadModel('file')->saveUpload('release', $releaseID);
- if($changes or $files)
+
+ if($changes)
{
- $fileAction = '';
- if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
- $actionID = $this->loadModel('action')->create('release', $releaseID, 'Edited', $fileAction);
+ $actionID = $this->loadModel('action')->create('release', $releaseID, 'Edited');
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
}
diff --git a/module/release/lang/de.php b/module/release/lang/de.php
index 73612af094..d2e7ef5f37 100644
--- a/module/release/lang/de.php
+++ b/module/release/lang/de.php
@@ -42,6 +42,7 @@ $lang->release->name = 'Name';
$lang->release->marker = 'Meilensteine';
$lang->release->date = 'Datum';
$lang->release->desc = 'Beschreibung';
+$lang->release->files = 'Gehäuse';
$lang->release->status = 'Status';
$lang->release->subStatus = 'Sub Status';
$lang->release->last = 'Letztes Release';
diff --git a/module/release/lang/en.php b/module/release/lang/en.php
index 37f90fe6da..51bda2c5e6 100644
--- a/module/release/lang/en.php
+++ b/module/release/lang/en.php
@@ -42,6 +42,7 @@ $lang->release->name = 'Name';
$lang->release->marker = 'Milestone';
$lang->release->date = 'Release Date';
$lang->release->desc = 'Description';
+$lang->release->files = 'Files';
$lang->release->status = 'Status';
$lang->release->subStatus = 'Sub Status';
$lang->release->last = 'Last Release';
diff --git a/module/release/lang/fr.php b/module/release/lang/fr.php
index d469898251..ec8a2860ef 100644
--- a/module/release/lang/fr.php
+++ b/module/release/lang/fr.php
@@ -42,6 +42,7 @@ $lang->release->name = 'Nom';
$lang->release->marker = 'Etape Importante';
$lang->release->date = 'Date Release';
$lang->release->desc = 'Description';
+$lang->release->files = 'Files';
$lang->release->status = 'Statut';
$lang->release->subStatus = 'Sous-statut';
$lang->release->last = 'Dernière Release';
diff --git a/module/release/lang/vi.php b/module/release/lang/vi.php
index 4861c32caf..8bd7166e75 100644
--- a/module/release/lang/vi.php
+++ b/module/release/lang/vi.php
@@ -41,6 +41,7 @@ $lang->release->name = 'Tên';
$lang->release->marker = 'Cột mốc';
$lang->release->date = 'Ngày';
$lang->release->desc = 'Mô tả';
+$lang->release->files = 'Chung';
$lang->release->status = 'Tình trạng';
$lang->release->subStatus = 'Tình trạng con';
$lang->release->last = 'Phát hành gần nhất';
diff --git a/module/release/lang/zh-cn.php b/module/release/lang/zh-cn.php
index 1a5366da43..e40eddf76f 100644
--- a/module/release/lang/zh-cn.php
+++ b/module/release/lang/zh-cn.php
@@ -42,6 +42,7 @@ $lang->release->name = '发布名称';
$lang->release->marker = '里程碑';
$lang->release->date = '发布日期';
$lang->release->desc = '描述';
+$lang->release->files = '附件';
$lang->release->status = '状态';
$lang->release->subStatus = '子状态';
$lang->release->last = '上次发布';
diff --git a/module/release/lang/zh-tw.php b/module/release/lang/zh-tw.php
index 686384c602..fd50308593 100644
--- a/module/release/lang/zh-tw.php
+++ b/module/release/lang/zh-tw.php
@@ -42,6 +42,7 @@ $lang->release->name = '發佈名稱';
$lang->release->marker = '里程碑';
$lang->release->date = '發佈日期';
$lang->release->desc = '描述';
+$lang->release->files = '附件';
$lang->release->status = '狀態';
$lang->release->subStatus = '子狀態';
$lang->release->last = '上次發佈';
diff --git a/module/release/model.php b/module/release/model.php
index 1215b765bd..212bf022e7 100644
--- a/module/release/model.php
+++ b/module/release/model.php
@@ -263,13 +263,14 @@ class releaseModel extends model
{
/* Init vars. */
$releaseID = (int)$releaseID;
- $oldRelease = $this->dao->select('*')->from(TABLE_RELEASE)->where('id')->eq($releaseID)->fetch();
+ $oldRelease = $this->getById($releaseID);
$branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq((int)$this->post->build)->fetch('branch');
$release = fixer::input('post')->stripTags($this->config->release->editor->edit['id'], $this->config->allowedTags)
->add('id', $releaseID)
->add('branch', (int)$branch)
->setDefault('mailto', '')
+ ->setDefault('deleteFiles', array())
->join('mailto', ',')
->setIF(!$this->post->marker, 'marker', 0)
->cleanInt('product')
@@ -286,7 +287,7 @@ class releaseModel extends model
$release->project = $buildInfo->project;
}
- $this->dao->update(TABLE_RELEASE)->data($release)
+ $this->dao->update(TABLE_RELEASE)->data($release, 'deleteFiles')
->autoCheck()
->batchCheck($this->config->release->edit->requiredFields, 'notempty')
->check('name', 'unique', "id != '$releaseID' AND product = '{$release->product}' AND branch = '$branch' AND deleted = '0'")
@@ -295,7 +296,7 @@ class releaseModel extends model
->exec();
if(!dao::isError())
{
- $this->file->updateObjectID($this->post->uid, $releaseID, 'release');
+ $this->file->processFile4Object('release', $oldRelease, $release);
return common::createChanges($oldRelease, $release);
}
}
diff --git a/module/release/view/edit.html.php b/module/release/view/edit.html.php
index 7bd197dab6..a72643b371 100644
--- a/module/release/view/edit.html.php
+++ b/module/release/view/edit.html.php
@@ -62,7 +62,10 @@
| files;?> |
- fetch('file', 'buildform');?> |
+
+ fetch('file', 'printFiles', array('files' => $release->files, 'fieldset' => 'false', 'object' => $release, 'method' => 'edit'));?>
+ fetch('file', 'buildform');?>
+ |
diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php
index 801b54a2fc..ba37f91c67 100644
--- a/module/release/view/view.html.php
+++ b/module/release/view/view.html.php
@@ -373,11 +373,11 @@
files?>
-
+
files)
{
- echo $this->fetch('file', 'printFiles', array('files' => $release->files, 'fieldset' => 'false'));
+ echo $this->fetch('file', 'printFiles', array('files' => $release->files, 'fieldset' => 'false', 'object' => $release, 'method' => 'view', 'showDelete' => false));
}
elseif($release->filePath)
{
diff --git a/module/story/control.php b/module/story/control.php
index da2e97f5ca..5ecf59f8c1 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -863,7 +863,6 @@ class story extends control
$this->view->reviewers = array_keys($reviewerList);
$this->view->reviewedReviewer = $reviewedReviewer;
$this->view->productReviewers = $this->user->getPairs('noclosed|nodeleted', array_keys($reviewerList), 0, $productReviewers);
- $this->view->files = $this->file->getByObject($story->type, $storyID, $story->version);
$this->display();
}
@@ -1080,25 +1079,17 @@ class story extends control
$this->loadModel('file');
if(!empty($_POST))
{
- $deleteFiles = isset($_POST['deleteFiles']) ? $this->file->getPairs($_POST['deleteFiles'], 'title') : array();
- $changes = $this->story->change($storyID);
+ $changes = $this->story->change($storyID);
if(dao::isError())
{
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'message' => dao::getError()));
return print(js::error(dao::getError()));
}
- $story = $this->story->getByID($storyID);
- $version = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch('version');
- $files = $this->file->saveUpload($story->type, $storyID, ",$version,");
- if(empty($files) and $this->post->uid != '' and isset($_SESSION['album']['used'][$this->post->uid])) $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]);
-
- if($this->post->comment != '' or !empty($changes) or !empty($files) or !empty($deleteFiles))
+ if($this->post->comment != '' or !empty($changes))
{
- $action = (!empty($changes) or !empty($files)) ? 'Changed' : 'Commented';
- $fileAction = empty($files) ? '' : $this->lang->addFiles . join(',', $files) . "\n" ;
- $fileAction .= empty($deleteFiles) ? '' : $this->lang->deleteFiles . join(',', $deleteFiles) . "\n";
- $actionID = $this->action->create('story', $storyID, $action, $fileAction . $this->post->comment);
+ $action = !empty($changes) ? 'Changed' : 'Commented';
+ $actionID = $this->action->create('story', $storyID, $action, $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
@@ -1148,7 +1139,7 @@ class story extends control
$this->app->loadLang('testcase');
$this->app->loadLang('execution');
- $story = $this->story->getById($storyID);
+ $story = $this->view->story;
$reviewer = $this->story->getReviewerPairs($storyID, $story->version);
$product = $this->loadModel('product')->getByID($story->product);
@@ -1163,7 +1154,6 @@ class story extends control
$this->view->needReview = (($this->app->user->account == $this->view->product->PO or $this->config->story->needReview == 0) and empty($reviewer)) ? "checked='checked'" : "";
$this->view->reviewer = implode(',', array_keys($reviewer));
$this->view->productReviewers = $this->user->getPairs('noclosed|nodeleted', $reviewer, 0, $productReviewers);
- $this->view->files = $this->file->getByObject($story->type, $storyID, $story->version);
$this->display();
}
@@ -1250,7 +1240,6 @@ class story extends control
$this->story->replaceURLang($story->type);
- $story->files = $this->loadModel('file')->getByObject($story->type, $storyID, $version);
$product = $this->dao->findById($story->product)->from(TABLE_PRODUCT)->fields('name, id, type, status')->fetch();
$plan = $this->dao->findById($story->plan)->from(TABLE_PRODUCTPLAN)->fetch('title');
$bugs = $this->dao->select('id,title,status,pri,severity')->from(TABLE_BUG)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->fetchAll();
diff --git a/module/story/model.php b/module/story/model.php
index 93040402d1..2a0827c32a 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -30,18 +30,20 @@ class storyModel extends model
->fetch();
if(!$story) return false;
+ $this->loadModel('file');
if(helper::isZeroDate($story->closedDate)) $story->closedDate = '';
if($version == 0) $version = $story->version;
- $spec = $this->dao->select('title,spec,verify')->from(TABLE_STORYSPEC)->where('story')->eq($storyID)->andWhere('version')->eq($version)->fetch();
+ $spec = $this->dao->select('title,spec,verify,files')->from(TABLE_STORYSPEC)->where('story')->eq($storyID)->andWhere('version')->eq($version)->fetch();
$story->title = isset($spec->title) ? $spec->title : '';
$story->spec = isset($spec->spec) ? $spec->spec : '';
$story->verify = isset($spec->verify) ? $spec->verify : '';
+ $story->files = isset($spec->files) ? $this->file->getByIdList($spec->files) : '';
if(!empty($story->fromStory)) $story->sourceName = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($story->fromStory)->fetch('title');
/* Check parent story. */
if($story->parent > 0) $story->parentName = $this->dao->findById($story->parent)->from(TABLE_STORY)->fetch('title');
- $story = $this->loadModel('file')->replaceImgURL($story, 'spec,verify');
+ $story = $this->file->replaceImgURL($story, 'spec,verify');
if($setImgSize) $story->spec = $this->file->setImgSize($story->spec);
if($setImgSize) $story->verify = $this->file->setImgSize($story->verify);
@@ -264,21 +266,22 @@ class storyModel extends model
$this->subdivide($story->parent, $stories);
}
- $this->file->updateObjectID($this->post->uid, $storyID, $story->type);
- $this->file->saveUpload($story->type, $storyID, ',1,');
-
if(!empty($story->plan))
{
$this->updateStoryOrderOfPlan($storyID, $story->plan); // Set story order in this plan.
$this->loadModel('action')->create('productplan', $story->plan, 'linkstory', '', $storyID);
}
+ $this->file->updateObjectID($this->post->uid, $storyID, $story->type);
+ $files = $this->file->saveUpload($story->type, $storyID, 1);
+
$data = new stdclass();
$data->story = $storyID;
$data->version = 1;
$data->title = $story->title;
$data->spec = $story->spec;
$data->verify = $story->verify;
+ $data->files = join(',', array_keys($files));
$this->dao->insert(TABLE_STORYSPEC)->data($data)->exec();
/* Save the story reviewer to storyreview table. */
@@ -658,11 +661,7 @@ class storyModel extends model
public function change($storyID)
{
$specChanged = false;
- $oldStory = $this->dao->findById((int)$storyID)->from(TABLE_STORY)->fetch();
- $oldSpec = $this->dao->select('title,spec,verify')->from(TABLE_STORYSPEC)->where('story')->eq((int)$storyID)->andWhere('version')->eq($oldStory->version)->fetch();
- $oldStory->title = isset($oldSpec->title) ? $oldSpec->title : '';
- $oldStory->spec = isset($oldSpec->spec) ? $oldSpec->spec : '';
- $oldStory->verify = isset($oldSpec->verify) ? $oldSpec->verify : '';
+ $oldStory = $this->getById($storyID);
if(!empty($_POST['lastEditedDate']) and $oldStory->lastEditedDate != $this->post->lastEditedDate)
{
@@ -688,12 +687,13 @@ class storyModel extends model
$oldStoryReviewers = $this->getReviewerPairs($storyID, $oldStory->version);
$_POST['reviewer'] = isset($_POST['reviewer']) ? $_POST['reviewer'] : array();
$reviewerHasChanged = (array_diff(array_keys($oldStoryReviewers), $_POST['reviewer']) or array_diff($_POST['reviewer'], array_keys($oldStoryReviewers)));
- if($story->spec != $oldStory->spec or $story->verify != $oldStory->verify or $story->title != $oldStory->title or $this->loadModel('file')->getCount() or $reviewerHasChanged or isset($_POST['deleteFiles'])) $specChanged = true;
+ if($story->spec != $oldStory->spec or $story->verify != $oldStory->verify or $story->title != $oldStory->title or $this->loadModel('file')->getCount() or $reviewerHasChanged or isset($story->deleteFiles)) $specChanged = true;
$now = helper::now();
$story = fixer::input('post')
->callFunc('title', 'trim')
->setDefault('lastEditedBy', $this->app->user->account)
+ ->setDefault('deleteFiles', array())
->add('id', $storyID)
->add('lastEditedDate', $now)
->setIF($specChanged, 'version', $oldStory->version + 1)
@@ -706,11 +706,11 @@ class storyModel extends model
->setIF($specChanged and $oldStory->closedBy, 'closedDate', '0000-00-00')
->setIF(!$specChanged, 'status', $oldStory->status)
->stripTags($this->config->story->editor->change['id'], $this->config->allowedTags)
- ->remove('files,labels,reviewer,comment,needNotReview,uid,deleteFiles')
+ ->remove('files,labels,reviewer,comment,needNotReview,uid')
->get();
$story = $this->loadModel('file')->processImgURL($story, $this->config->story->editor->change['id'], $this->post->uid);
- $this->dao->update(TABLE_STORY)->data($story, 'spec,verify')
+ $this->dao->update(TABLE_STORY)->data($story, 'spec,verify,deleteFiles')
->autoCheck()
->batchCheck($this->config->story->change->requiredFields, 'notempty')
->checkFlow()
@@ -720,20 +720,27 @@ class storyModel extends model
{
if($specChanged)
{
+ $this->file->updateObjectID($this->post->uid, $storyID, 'story');
+ $addedFiles = $this->file->saveUpload($oldStory->type, $storyID, $story->version);
+ $addedFiles = empty($addedFiles) ? '' : join(',', array_keys($addedFiles)) . ',';
+ $storyFiles = $oldStory->files = join(',', array_keys($oldStory->files));
+ foreach($story->deleteFiles as $fileID) $storyFiles = str_replace(",$fileID,", ',', ",$storyFiles,");
+
$data = new stdclass();
$data->story = $storyID;
- $data->version = $oldStory->version + 1;
+ $data->version = $story->version;
$data->title = $story->title;
$data->spec = $story->spec;
$data->verify = $story->verify;
+ $data->files = $story->files = $addedFiles . trim($storyFiles, ',');
$this->dao->insert(TABLE_STORYSPEC)->data($data)->exec();
- $story = $this->getById($storyID);
/* IF is story and has changed, update its relation version to new. */
if($oldStory->type == 'story')
{
+ $newStory = $this->getById($storyID);
$this->dao->update(TABLE_STORY)->set('URChanged')->eq(0)->where('id')->eq($oldStory->id)->exec();
- $this->updateStoryVersion($story);
+ $this->updateStoryVersion($newStory);
}
else
{
@@ -742,7 +749,7 @@ class storyModel extends model
->where('AType')->eq('requirement')
->andWhere('BType')->eq('story')
->andWhere('relation')->eq('subdivideinto')
- ->andWhere('AID')->eq($story->id)
+ ->andWhere('AID')->eq($storyID)
->fetchPairs();
foreach($relations as $relationID) $this->dao->update(TABLE_STORY)->set('URChanged')->eq(1)->where('id')->eq($relationID)->exec();
@@ -763,13 +770,8 @@ class storyModel extends model
$oldStory->reviewers = implode(',', array_keys($oldStoryReviewers));
$story->reviewers = implode(',', $_POST['reviewer']);
}
-
- $deleteFiles = isset($_POST['deleteFiles']) ? $_POST['deleteFiles'] : array();
- if(!empty($deleteFiles)) $this->file->deleteStoryFile($story->id, $story->version, $deleteFiles);
- $this->file->updateStoryFileVersion($story->id, $story->version, $deleteFiles);
}
- $this->file->updateObjectID($this->post->uid, $storyID, 'story');
return common::createChanges($oldStory, $story);
}
}
@@ -784,7 +786,7 @@ class storyModel extends model
public function update($storyID)
{
$now = helper::now();
- $oldStory = $this->dao->select('*')->from(TABLE_STORY)->where('id')->eq($storyID)->fetch();
+ $oldStory = $this->getById($storyID);
if(!empty($_POST['lastEditedDate']) and $oldStory->lastEditedDate != $this->post->lastEditedDate)
{
dao::$errors[] = $this->lang->error->editedByOther;
@@ -797,11 +799,6 @@ class storyModel extends model
return false;
}
- $oldSpec = $this->dao->select('title,spec,verify')->from(TABLE_STORYSPEC)->where('story')->eq((int)$storyID)->andWhere('version')->eq($oldStory->version)->fetch();
- $oldStory->title = isset($oldSpec->title) ? $oldSpec->title : '';
- $oldStory->spec = isset($oldSpec->spec) ? $oldSpec->spec : '';
- $oldStory->verify = isset($oldSpec->verify) ? $oldSpec->verify : '';
-
$story = fixer::input('post')
->cleanInt('product,module,pri,duplicateStory')
->cleanFloat('estimate')
@@ -812,6 +809,7 @@ class storyModel extends model
->setDefault('spec', $oldStory->spec)
->setDefault('verify', $oldStory->verify)
->setDefault('mailto', '')
+ ->setDefault('deleteFiles', array())
->add('id', $storyID)
->add('lastEditedDate', $now)
->setDefault('plan,notifyEmail', '')
@@ -831,7 +829,7 @@ class storyModel extends model
->join('linkStories', ',')
->join('linkRequirements', ',')
->join('childStories', ',')
- ->remove('files,labels,comment,contactListMenu,stages,reviewer,needNotReview,deleteFiles')
+ ->remove('files,labels,comment,contactListMenu,stages,reviewer,needNotReview')
->get();
if($oldStory->type == 'story' and !isset($story->linkStories)) $story->linkStories = '';
@@ -877,34 +875,34 @@ class storyModel extends model
{
$_POST['reviewer'] = isset($_POST['needNotReview']) ? array() : array_filter($_POST['reviewer']);
$oldReviewer = $this->getReviewerPairs($storyID, $oldStory->version);
- if(array_diff($_POST['reviewer'], array_keys($oldReviewer)) or array_diff(array_keys($oldReviewer), $_POST['reviewer']))
+
+ /* Update story reviewer. */
+ $this->dao->delete()->from(TABLE_STORYREVIEW)
+ ->where('story')->eq($storyID)
+ ->andWhere('version')->eq($oldStory->version)
+ ->beginIF($oldStory->status == 'reviewing')->andWhere('reviewer')->notin(implode(',', $_POST['reviewer']))
+ ->exec();
+
+ foreach($_POST['reviewer'] as $reviewer)
{
- /* Update story reviewer. */
- $this->dao->delete()->from(TABLE_STORYREVIEW)->where('story')->eq($storyID)->andWhere('version')->eq($oldStory->version)->andWhere('reviewer')->notin(implode(',', $_POST['reviewer']))->exec();
- foreach($_POST['reviewer'] as $reviewer)
- {
- if(in_array($reviewer, array_keys($oldReviewer))) continue;
+ if($oldStory->status == 'reviewing' and in_array($reviewer, array_keys($oldReviewer))) continue;
- $reviewData = new stdclass();
- $reviewData->story = $storyID;
- $reviewData->version = $oldStory->version;
- $reviewData->reviewer = $reviewer;
- $this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec();
- }
-
- if($story->status == 'reviewing')
- {
- $story->reviewedBy = $oldStory->reviewedBy;
- $story = $this->updateStoryByReview($storyID, $oldStory, $story);
- }
+ $reviewData = new stdclass();
+ $reviewData->story = $storyID;
+ $reviewData->version = $oldStory->version;
+ $reviewData->reviewer = $reviewer;
+ $this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec();
}
+ if($oldStory->status == 'reviewing') $story = $this->updateStoryByReview($storyID, $oldStory, $story);
+ if(strpos('draft,changing', $oldStory->status) != false) $story->reviewedBy = '';
+
$oldStory->reviewers = implode(',', array_keys($oldReviewer));
$story->reviewers = implode(',', array_keys($this->getReviewerPairs($storyID, $oldStory->version)));
}
$this->dao->update(TABLE_STORY)
- ->data($story, 'reviewers,spec,verify,finalResult')
+ ->data($story, 'reviewers,spec,verify,finalResult,deleteFiles')
->autoCheck()
->checkIF(isset($story->closedBy), 'closedReason', 'notempty')
->checkIF(isset($story->closedReason) and $story->closedReason == 'done', 'stage', 'notempty')
@@ -916,12 +914,20 @@ class storyModel extends model
if(!dao::isError())
{
- if($story->spec != $oldStory->spec or $story->verify != $oldStory->verify or $story->title != $oldStory->title)
+ $this->file->updateObjectID($this->post->uid, $storyID, 'story');
+ $addedFiles = $this->file->saveUpload($oldStory->type, $storyID, $oldStory->version);
+
+ if($story->spec != $oldStory->spec or $story->verify != $oldStory->verify or $story->title != $oldStory->title or !empty($story->deleteFiles) or !empty($addedFiles))
{
+ $addedFiles = empty($addedFiles) ? '' : join(',', array_keys($addedFiles)) . ',';
+ $storyFiles = $oldStory->files = join(',', array_keys($oldStory->files));
+ foreach($story->deleteFiles as $fileID) $storyFiles = str_replace(",$fileID,", ',', ",$storyFiles,");
+
$data = new stdclass();
$data->title = $story->title;
$data->spec = $story->spec;
$data->verify = $story->verify;
+ $data->files = $story->files = $addedFiles . trim($storyFiles, ',');
$this->dao->update(TABLE_STORYSPEC)->data($data)->where('story')->eq((int)$storyID)->andWhere('version')->eq($oldStory->version)->exec();
}
@@ -1040,21 +1046,13 @@ class storyModel extends model
}
}
- $changes = common::createChanges($oldStory, $story);
- $deleteFiles = isset($_POST['deleteFiles']) ? $this->file->getPairs($_POST['deleteFiles'], 'title') : array();
-
- if(isset($_POST['deleteFiles'])) $this->file->deleteStoryFile($storyID, $oldStory->version, $_POST['deleteFiles']);
- $this->file->updateObjectID($this->post->uid, $storyID, 'story');
-
- $files = $this->file->saveUpload($oldStory->type, $storyID, ",$oldStory->version,");
+ $changes = common::createChanges($oldStory, $story);
if(empty($files) and $this->post->uid != '' and isset($_SESSION['album']['used'][$this->post->uid])) $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]);
- if($this->post->comment != '' or !empty($changes) or !empty($files) or !empty($deleteFiles))
+ if($this->post->comment != '' or !empty($changes))
{
- $action = (!empty($changes) or !empty($files)) ? 'Edited' : 'Commented';
- $fileAction = empty($files) ? '' : $this->lang->addFiles . join(',', $files) . "\n" ;
- $fileAction .= empty($deleteFiles) ? '' : $this->lang->deleteFiles . join(',', $deleteFiles) . "\n";
- $actionID = $this->action->create('story', $storyID, $action, $fileAction . $this->post->comment);
+ $action = !empty($changes) ? 'Edited' : 'Commented';
+ $actionID = $this->action->create('story', $storyID, $action, $this->post->comment);
$this->action->logHistory($actionID, $changes);
if(isset($story->finalResult)) $this->recordReviewAction($story);
@@ -1609,8 +1607,6 @@ class storyModel extends model
/* Delete versions that is after this version. */
$this->dao->delete()->from(TABLE_STORYSPEC)->where('story')->eq($storyID)->andWHere('version')->eq($story->version)->exec();
$this->dao->delete()->from(TABLE_STORYREVIEW)->where('story')->eq($storyID)->andWhere('version')->eq($story->version)->exec();
-
- $this->loadModel('file')->deleteStoryFile($storyID, $story->version);
}
/**
@@ -5620,8 +5616,6 @@ class storyModel extends model
/* Delete versions that is after this version. */
$this->dao->delete()->from(TABLE_STORYSPEC)->where('story')->eq($story->id)->andWHere('version')->in($oldStory->version)->exec();
$this->dao->delete()->from(TABLE_STORYREVIEW)->where('story')->eq($story->id)->andWhere('version')->in($oldStory->version)->exec();
-
- $this->file->deleteStoryFile($story->id, $oldStory->version);
}
if($result == 'reject')
diff --git a/module/story/view/change.html.php b/module/story/view/change.html.php
index 157e16aed3..af6fcf4670 100644
--- a/module/story/view/change.html.php
+++ b/module/story/view/change.html.php
@@ -68,7 +68,7 @@
| attatch;?> |
- fetch('file', 'printFiles', array('files' => $files, 'fieldset' => 'false', 'object' => $story, 'method' => 'edit'));?>
+ fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'false', 'object' => $story, 'method' => 'edit'));?>
fetch('file', 'buildform');?>
|
diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php
index 62528e92cd..9ee361c6cb 100644
--- a/module/story/view/edit.html.php
+++ b/module/story/view/edit.html.php
@@ -85,13 +85,13 @@
status) !== false ? html::textarea('verify', htmlSpecialString($story->verify), "rows='5' class='form-control'") : $story->verify;?>
- status) === false and empty($files)) ? false : true;?>
+ status) === false and empty($story->files)) ? false : true;?>
attatch;?>
status) !== false ? true : false;?>
- fetch('file', 'printFiles', array('files' => $files, 'fieldset' => 'false', 'object' => $story, 'method' => 'edit', 'showDelete' => $canChangeFile));?>
+ fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'false', 'object' => $story, 'method' => 'edit', 'showDelete' => $canChangeFile));?>
fetch('file', 'buildform') : '';?>
diff --git a/module/task/control.php b/module/task/control.php
index 6125de6866..fd13be6643 100755
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -537,20 +537,16 @@ class task extends control
{
$this->loadModel('action');
$changes = array();
- $files = array();
if($comment == false)
{
$changes = $this->task->update($taskID);
if(dao::isError()) return print(js::error(dao::getError()));
- $files = $this->loadModel('file')->saveUpload('task', $taskID);
- if(empty($files) and $this->post->uid != '' and isset($_SESSION['album']['used'][$this->post->uid])) $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]);
}
- if($this->post->comment != '' or !empty($changes) or !empty($files))
+ if($this->post->comment != '' or !empty($changes))
{
- $action = (!empty($changes) or !empty($files)) ? 'Edited' : 'Commented';
- $fileAction = !empty($files) ? $this->lang->addFiles . join(',', $files) . "\n" : '';
- $actionID = $this->action->create('task', $taskID, $action, $fileAction . $this->post->comment);
+ $action = !empty($changes) ? 'Edited' : 'Commented';
+ $actionID = $this->action->create('task', $taskID, $action, $this->post->comment);
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
}
diff --git a/module/task/css/recordestimate.css b/module/task/css/recordestimate.css
index 41a33d7a0d..3a3a23d572 100644
--- a/module/task/css/recordestimate.css
+++ b/module/task/css/recordestimate.css
@@ -13,3 +13,4 @@
.icon-calendar {color: rgb(22, 168, 248)}
#recordForm .table>thead>tr>th{ border: none}
.main-header {border-bottom: none !important}
+.body-modal .main-header>h2 { max-width: 70% !important;}
diff --git a/module/task/css/view.css b/module/task/css/view.css
index 2791ac7347..dcfd252afb 100644
--- a/module/task/css/view.css
+++ b/module/task/css/view.css
@@ -19,3 +19,6 @@
.c-actions {width: 175px;}
[lang^='de'] #mainContent .main-actions .btn-toolbar .btn {padding-left: 3px; padding-right: 3px;}
+
+#childrenTable .c-id {width: 60px;}
+#childrenTable .c-lblPri {width: 50px;}
diff --git a/module/task/js/activate.js b/module/task/js/activate.js
index c4aacfa326..bbaa94f90e 100644
--- a/module/task/js/activate.js
+++ b/module/task/js/activate.js
@@ -14,7 +14,7 @@ $('#confirmButton').click(function()
var $tr = $(this).closest('tr');
var account = $(this).find('option:selected').text();
- estimate = parseFloat($tr.find('[name^=teamEstimate]').val());
+ var estimate = parseFloat($tr.find('[name^=teamEstimate]').val());
if(!isNaN(estimate)) totalEstimate += estimate;
if(isNaN(estimate) || estimate == 0)
{
@@ -23,12 +23,13 @@ $('#confirmButton').click(function()
return false;
}
- consumed = parseFloat($tr.find('[name^=teamConsumed]').val());
+ var consumed = parseFloat($tr.find('[name^=teamConsumed]').val());
if(!isNaN(consumed)) totalConsumed += consumed;
- left = parseFloat($tr.find('[name^=teamLeft]').val());
+ var $left = $tr.find('[name^=teamLeft]');
+ var left = parseFloat($left.val());
if(!isNaN(left)) totalLeft += left;
- if(!$tr.hasClass('member-done') && (isNaN(left) || left == 0))
+ if(!$left.prop('readonly') && (isNaN(left) || left == 0))
{
bootbox.alert(account + ' ' + leftNotEmpty);
error = true;
diff --git a/module/task/js/edit.js b/module/task/js/edit.js
index f59094b8fd..8c6147bb47 100644
--- a/module/task/js/edit.js
+++ b/module/task/js/edit.js
@@ -97,7 +97,7 @@ $('#confirmButton').click(function()
var $tr = $(this).closest('tr');
var account = $(this).find('option:selected').text();
- estimate = parseFloat($tr.find('[name^=teamEstimate]').val());
+ var estimate = parseFloat($tr.find('[name^=teamEstimate]').val());
if(!isNaN(estimate)) totalEstimate += estimate;
if(isNaN(estimate) || estimate == 0)
{
@@ -106,12 +106,13 @@ $('#confirmButton').click(function()
return false;
}
- consumed = parseFloat($tr.find('[name^=teamConsumed]').val());
+ var consumed = parseFloat($tr.find('[name^=teamConsumed]').val());
if(!isNaN(consumed)) totalConsumed += consumed;
- left = parseFloat($tr.find('[name^=teamLeft]').val());
+ var $left = $tr.find('[name^=teamLeft]');
+ var left = parseFloat($left.val());
if(!isNaN(left)) totalLeft += left;
- if(!$tr.hasClass('member-done') && (isNaN(left) || left == 0))
+ if(!$left.prop('readonly') && (isNaN(left) || left == 0))
{
bootbox.alert(account + ' ' + leftNotEmpty);
error = true;
diff --git a/module/task/lang/de.php b/module/task/lang/de.php
index 274ede3ade..4aaea21c45 100644
--- a/module/task/lang/de.php
+++ b/module/task/lang/de.php
@@ -47,6 +47,7 @@ $lang->task->exportAction = "Export Task";
$lang->task->reportChart = "Bericht Chart";
$lang->task->fromBug = 'Von Bug';
$lang->task->case = 'Fall';
+$lang->task->process = 'Process Task';
$lang->task->confirmStoryChange = "Storyäanderung bestätigen";
$lang->task->storyChange = "Story Changed";
$lang->task->progress = 'Fortschritt';
@@ -57,7 +58,7 @@ $lang->task->waitTask = 'Waiting Task';
$lang->task->allModule = 'All Module';
$lang->task->replace = 'Replace';
$lang->task->myEffort = 'My Effort';
-$lang->task->allEffort = 'All Effort';
+$lang->task->allEffort = 'Team Effort';
$lang->task->teamOrder = 'Order';
$lang->task->common = 'Aufgabe';
diff --git a/module/task/lang/en.php b/module/task/lang/en.php
index c09efd9985..e4ddff1baa 100755
--- a/module/task/lang/en.php
+++ b/module/task/lang/en.php
@@ -47,6 +47,7 @@ $lang->task->exportAction = "Export Task";
$lang->task->reportChart = "Report Chart";
$lang->task->fromBug = 'From Bug';
$lang->task->case = 'Linked Case';
+$lang->task->process = 'Process Task';
$lang->task->confirmStoryChange = "Confirm Change";
$lang->task->storyChange = "Story Changed";
$lang->task->progress = 'Progress';
@@ -57,7 +58,7 @@ $lang->task->waitTask = 'Waiting Task';
$lang->task->allModule = 'All Module';
$lang->task->replace = 'Replace';
$lang->task->myEffort = 'My Effort';
-$lang->task->allEffort = 'All Effort';
+$lang->task->allEffort = 'Team Effort';
$lang->task->teamOrder = 'Order';
$lang->task->common = 'Task';
diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php
index 8b447014b7..2805086107 100644
--- a/module/task/lang/fr.php
+++ b/module/task/lang/fr.php
@@ -47,6 +47,7 @@ $lang->task->exportAction = "Exporter Tâche";
$lang->task->reportChart = "Rapport Graphique";
$lang->task->fromBug = 'à partir Bug';
$lang->task->case = 'Associée CasTest';
+$lang->task->process = 'Process Task';
$lang->task->confirmStoryChange = "Confirmer Changement";
$lang->task->storyChange = "Story Changée";
$lang->task->progress = 'Progression';
@@ -57,7 +58,7 @@ $lang->task->waitTask = 'Tâche en attente';
$lang->task->allModule = 'Tous Modules';
$lang->task->replace = 'Replace';
$lang->task->myEffort = 'My Effort';
-$lang->task->allEffort = 'All Effort';
+$lang->task->allEffort = 'Team Effort';
$lang->task->teamOrder = 'Order';
$lang->task->common = 'Tâche';
diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php
index a2f5e4cb48..68a589f93d 100755
--- a/module/task/lang/zh-cn.php
+++ b/module/task/lang/zh-cn.php
@@ -47,6 +47,7 @@ $lang->task->exportAction = "导出任务";
$lang->task->reportChart = "报表统计";
$lang->task->fromBug = '来源Bug';
$lang->task->case = '相关用例';
+$lang->task->process = '处理任务';
$lang->task->confirmStoryChange = "确认{$lang->SRCommon}变动";
$lang->task->storyChange = "{$lang->SRCommon}变更";
$lang->task->progress = '进度';
@@ -57,7 +58,7 @@ $lang->task->waitTask = '未开始的任务';
$lang->task->allModule = '所有模块';
$lang->task->replace = '替换';
$lang->task->myEffort = '我的日志';
-$lang->task->allEffort = '所有日志';
+$lang->task->allEffort = '团队日志';
$lang->task->teamOrder = '工序';
$lang->task->common = '任务';
@@ -166,7 +167,7 @@ $lang->task->recordEstimateAction = '添加工时';
$lang->task->ditto = '同上';
$lang->task->dittoNotice = "该任务与上一任务不属于同一%s!";
-$lang->task->selectTestStory = "选择测试{$lang->SRCommon}";
+$lang->task->selectTestStory = "选择{$lang->SRCommon}";
$lang->task->selectAllUser = '全部';
$lang->task->noStory = "无{$lang->SRCommon}";
$lang->task->noAssigned = '未指派';
diff --git a/module/task/lang/zh-tw.php b/module/task/lang/zh-tw.php
index a54b405789..c9c423564a 100644
--- a/module/task/lang/zh-tw.php
+++ b/module/task/lang/zh-tw.php
@@ -152,7 +152,7 @@ $lang->task->recordEstimateAction = '添加工時';
$lang->task->ditto = '同上';
$lang->task->dittoNotice = "該任務與上一任務不屬於同一%s!";
-$lang->task->selectTestStory = "選擇測試需求";
+$lang->task->selectTestStory = "選擇{$lang->SRCommon}";
$lang->task->selectAllUser = '全部';
$lang->task->noStory = "無{$lang->SRCommon}";
$lang->task->noAssigned = '未指派';
diff --git a/module/task/model.php b/module/task/model.php
index e90cb1d08e..4e09cc4b6f 100755
--- a/module/task/model.php
+++ b/module/task/model.php
@@ -1075,6 +1075,7 @@ class taskModel extends model
->setDefault('story, estimate, left, consumed', 0)
->setDefault('realStarted', '0000-00-00 00:00:00')
->setDefault('mailto', '')
+ ->setDefault('deleteFiles', array())
->setIF(is_numeric($this->post->estimate), 'estimate', (float)$this->post->estimate)
->setIF(is_numeric($this->post->consumed), 'consumed', (float)$this->post->consumed)
->setIF(is_numeric($this->post->left), 'left', (float)$this->post->left)
@@ -1158,7 +1159,7 @@ class taskModel extends model
$requiredFields = trim($requiredFields, ',');
- $this->dao->update(TABLE_TASK)->data($task)
+ $this->dao->update(TABLE_TASK)->data($task, 'deleteFiles')
->autoCheck()
->batchCheckIF($task->status != 'cancel', $requiredFields, 'notempty')
->checkIF(!helper::isZeroDate($task->deadline), 'deadline', 'ge', $task->estStarted)
@@ -1247,12 +1248,10 @@ class taskModel extends model
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
}
}
- $this->file->updateObjectID($this->post->uid, $taskID, 'task');
unset($oldTask->parent);
unset($task->parent);
-
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
if(isset($oldTask->team))
@@ -1269,6 +1268,7 @@ class taskModel extends model
}
}
+ $this->file->processFile4Object('task', $oldTask, $task);
return common::createChanges($oldTask, $task);
}
}
diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php
index fb56d27a51..bbbc880e28 100644
--- a/module/task/view/edit.html.php
+++ b/module/task/view/edit.html.php
@@ -88,7 +88,10 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
printExtendFields($task, 'div', 'position=left');?>
files;?>
- fetch('file', 'buildform');?>
+
+ fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'false', 'object' => $task, 'method' => 'edit'));?>
+ fetch('file', 'buildform');?>
+
lastEditedDate);?>
diff --git a/module/task/view/lineareffort.html.php b/module/task/view/lineareffort.html.php
index caff269195..e49b2f7eef 100644
--- a/module/task/view/lineareffort.html.php
+++ b/module/task/view/lineareffort.html.php
@@ -18,7 +18,11 @@ foreach($efforts as $effort)
$account = $effort->account;
$allEfforts[$order][] = $effort;
$recorders[$order][$account] = $account;
- if($app->user->account == $account) $myOrders[$order] = $order;
+ if($app->user->account == $account)
+ {
+ if(!isset($myOrders[$order])) $myOrders[$order] = 0;
+ $myOrders[$order] += 1;
+ }
}
?>
@@ -30,25 +34,28 @@ foreach($efforts as $effort)
-
-
-
- user->account);?>
-
+ | task->teamOrder;?> |
task->date;?> |
task->recordedBy;?> |
- comment;?> |
+ task->work;?> |
task->consumed;?> |
task->left;?> |
actions;?> |
+ $count):?>
+
+ account != $this->app->user->account) continue;?>
+
+ |
+
+
date;?> |
account);?> |
work;?> |
@@ -63,31 +70,33 @@ foreach($efforts as $effort)
+
-
- $accounts):?>
-
-
-
-
+ | task->teamOrder;?> |
task->date;?> |
task->recordedBy;?> |
- comment;?> |
+ task->work;?> |
task->consumed;?> |
task->left;?> |
actions;?> |
+ $accounts):?>
+
+
+ |
+
+
date;?> |
account);?> |
work;?> |
@@ -102,9 +111,9 @@ foreach($efforts as $effort)
+
-
diff --git a/module/task/view/recordestimate.html.php b/module/task/view/recordestimate.html.php
index 5934918eaf..8f70f88c3c 100644
--- a/module/task/view/recordestimate.html.php
+++ b/module/task/view/recordestimate.html.php
@@ -74,10 +74,10 @@
- assignedTo != $app->user->account and $task->mode == 'linear'):?>
- task->deniedNotice, '' . $task->assignedToRealName . '', $lang->task->logEfforts);?>
- members[$app->user->account])):?>
+ members[$app->user->account])):?>
task->deniedNotice, '' . $lang->task->teamMember . '', $lang->task->logEfforts);?>
+ assignedTo != $app->user->account and $task->mode == 'linear'):?>
+ task->deniedNotice, '' . $task->assignedToRealName . '', $lang->task->logEfforts);?>
@@ -91,7 +91,7 @@
$readonly = ' readonly';
$left = 0;
$reverseOrders = array_reverse($myOrders, true);
- foreach($reverseOrders as $order) $reverseOrders[$order] = $order + 1;
+ foreach($reverseOrders as $order => $count) $reverseOrders[$order] = $order + 1;
}
?>
|