From 8448dedf534cfd7b325d0ddc912accf81cf745da Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 29 Mar 2018 09:43:53 +0800 Subject: [PATCH] * Add primary key for zt_team. --- db/update9.8.2.sql | 2 ++ db/zentao.sql | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 db/update9.8.2.sql diff --git a/db/update9.8.2.sql b/db/update9.8.2.sql new file mode 100644 index 0000000000..ae6e524018 --- /dev/null +++ b/db/update9.8.2.sql @@ -0,0 +1,2 @@ +ALTER TABLE `zt_team` DROP PRIMARY KEY, +ADD PRIMARY KEY (`root`,`type`,`account`); diff --git a/db/zentao.sql b/db/zentao.sql index 79008dde42..d810827238 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -655,7 +655,8 @@ CREATE TABLE IF NOT EXISTS `zt_team` ( `estimate` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0', `consumed` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0', `left` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0', - `order` TINYINT(3) NOT NULL DEFAULT '0' + `order` TINYINT(3) NOT NULL DEFAULT '0', + PRIMARY KEY (`root`,`type`,`account`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testreport`; CREATE TABLE IF NOT EXISTS `zt_testreport` (