From 2f2c7a77c5193f5ba36e741179b5165941f34550 Mon Sep 17 00:00:00 2001 From: vilson <545522390@qq.com> Date: Mon, 19 Aug 2019 10:03:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: vilson <545522390@qq.com> --- data/2.8.0/2.8.1-2.8.4.sql | 52 ++++++++++++++++++++++++ data/2.8.0/pearproject.sql | 82 ++++++++++++++++++++++++-------------- data/pearproject.sql | 82 ++++++++++++++++++++++++-------------- 3 files changed, 158 insertions(+), 58 deletions(-) diff --git a/data/2.8.0/2.8.1-2.8.4.sql b/data/2.8.0/2.8.1-2.8.4.sql index 7b5da0c..2318a5c 100644 --- a/data/2.8.0/2.8.1-2.8.4.sql +++ b/data/2.8.0/2.8.1-2.8.4.sql @@ -13,4 +13,56 @@ CREATE TABLE `pearproject`.`pear_project_report` ( UNIQUE INDEX `union`(`project_code`, `date`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目报表统计表' ROW_FORMAT = Compact; +ALTER TABLE `pearproject`.`pear_collection` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_department` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_department_member` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_file` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_invite_link` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_member` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_member_account` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_organization` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_project` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_project_features` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_project_log` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_project_member` ADD UNIQUE INDEX `unique`(`project_code`, `member_code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_project_report` ADD INDEX `code`(`project_code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_project_template` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_project_version` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_project_version_log` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_source_link` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_task` DROP INDEX `task`; + +ALTER TABLE `pearproject`.`pear_task` ADD UNIQUE INDEX `task`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_task_stages` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_task_stages_template` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_task_tag` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_task_to_tag` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_task_work_time` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_task_workflow` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + +ALTER TABLE `pearproject`.`pear_task_workflow_rule` ADD UNIQUE INDEX `code`(`code`) USING BTREE; + SET FOREIGN_KEY_CHECKS=1; diff --git a/data/2.8.0/pearproject.sql b/data/2.8.0/pearproject.sql index 41dde95..9d5ef93 100644 --- a/data/2.8.0/pearproject.sql +++ b/data/2.8.0/pearproject.sql @@ -11,7 +11,7 @@ Target Server Version : 50726 File Encoding : 65001 - Date: 18/08/2019 21:36:29 + Date: 19/08/2019 10:02:58 */ SET NAMES utf8mb4; @@ -29,7 +29,8 @@ CREATE TABLE `pear_collection` ( `member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '成员id', `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `id`(`id`) USING BTREE + UNIQUE INDEX `id`(`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 113 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '收藏表' ROW_FORMAT = Compact; -- ---------------------------- @@ -54,7 +55,8 @@ CREATE TABLE `pear_department` ( `icon` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图标', `create_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间', `path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '上级路径', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = Compact; -- ---------------------------- @@ -79,7 +81,8 @@ CREATE TABLE `pear_department_member` ( `is_principal` tinyint(1) NULL DEFAULT NULL COMMENT '是否负责人', `is_owner` tinyint(1) NULL DEFAULT 0 COMMENT '拥有者', `authorize` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门-成员表' ROW_FORMAT = Compact; -- ---------------------------- @@ -114,7 +117,8 @@ CREATE TABLE `pear_file` ( `file_url` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '完整地址', `file_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件类型', `deleted_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '删除时间', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '文件表' ROW_FORMAT = Compact; -- ---------------------------- @@ -142,7 +146,8 @@ CREATE TABLE `pear_invite_link` ( `source_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源编码', `create_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间', `over_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '过期时间', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '邀请链接表' ROW_FORMAT = Compact; -- ---------------------------- @@ -213,7 +218,8 @@ CREATE TABLE `pear_member` ( `dingtalk_unionid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '钉钉unionid', `dingtalk_userid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '钉钉用户id', PRIMARY KEY (`id`) USING BTREE, - INDEX `username`(`account`) USING BTREE + INDEX `username`(`account`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 589 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = Compact; -- ---------------------------- @@ -246,7 +252,8 @@ CREATE TABLE `pear_member_account` ( `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像', `position` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职位', `department` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织账号表' ROW_FORMAT = Compact; -- ---------------------------- @@ -342,7 +349,8 @@ CREATE TABLE `pear_organization` ( `province` int(10) NULL DEFAULT 0 COMMENT '省', `city` int(10) NULL DEFAULT 0 COMMENT '市', `area` int(10) NULL DEFAULT 0 COMMENT '区', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织表' ROW_FORMAT = Compact; -- ---------------------------- @@ -384,7 +392,8 @@ CREATE TABLE `pear_project` ( `begin_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目开始日期', `end_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目截止日期', PRIMARY KEY (`id`) USING BTREE, - INDEX `project`(`order`) USING BTREE + INDEX `project`(`order`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 13043 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目表' ROW_FORMAT = Compact; -- ---------------------------- @@ -1209,7 +1218,7 @@ CREATE TABLE `pear_project_collection` ( `member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '成员id', `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '加入时间', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 48 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-收藏表' ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-收藏表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of pear_project_collection @@ -1242,8 +1251,9 @@ CREATE TABLE `pear_project_features` ( `update_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `organization_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '组织id', `project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '版本库表' ROW_FORMAT = Compact; + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '版本库表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of pear_project_features @@ -1269,7 +1279,8 @@ CREATE TABLE `pear_project_log` ( `project_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `icon` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `is_robot` tinyint(1) NULL DEFAULT 0 COMMENT '是否机器人', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4468 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = Compact; -- ---------------------------- @@ -1878,7 +1889,8 @@ CREATE TABLE `pear_project_member` ( `join_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '加入时间', `is_owner` int(11) NULL DEFAULT 0 COMMENT '拥有者', `authorize` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `unique`(`project_code`, `member_code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-成员表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2171,7 +2183,8 @@ CREATE TABLE `pear_project_report` ( `create_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `update_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `union`(`project_code`, `date`) USING BTREE + UNIQUE INDEX `union`(`project_code`, `date`) USING BTREE, + INDEX `code`(`project_code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目报表统计表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2189,7 +2202,8 @@ CREATE TABLE `pear_project_template` ( `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面', `member_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建人', `is_system` tinyint(1) NULL DEFAULT 0 COMMENT '系统默认', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目类型表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2218,7 +2232,8 @@ CREATE TABLE `pear_project_version` ( `schedule` int(3) NULL DEFAULT 0 COMMENT '进度百分比', `plan_publish_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预计发布时间', `features_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本库编号', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目版本表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2244,7 +2259,8 @@ CREATE TABLE `pear_project_version_log` ( `project_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目编号', `icon` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `features_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本库编号', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2281,7 +2297,8 @@ CREATE TABLE `pear_source_link` ( `create_by` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', `create_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间', `sort` int(11) NULL DEFAULT 0 COMMENT '排序', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '资源关联表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2383,7 +2400,7 @@ CREATE TABLE `pear_task` ( `features_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '版本库id', `work_time` int(5) NULL DEFAULT 0 COMMENT '预估工时', PRIMARY KEY (`id`, `project_code`) USING BTREE, - INDEX `task`(`code`) USING BTREE + UNIQUE INDEX `task`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 12363 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2782,7 +2799,8 @@ CREATE TABLE `pear_task_stages` ( `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间', `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号', `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标记', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 77 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2837,7 +2855,8 @@ CREATE TABLE `pear_task_stages_template` ( `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sort` int(11) NULL DEFAULT 0, `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 84 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表模板表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2877,8 +2896,9 @@ CREATE TABLE `pear_task_tag` ( `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名', `color` enum('blue','red','orange','green','brown','purple') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'blue' COMMENT '颜色', `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签表' ROW_FORMAT = Compact; + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of pear_task_tag @@ -2897,7 +2917,8 @@ CREATE TABLE `pear_task_to_tag` ( `task_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0', `tag_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0', `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 138 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签映射表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2924,7 +2945,8 @@ CREATE TABLE `pear_task_work_time` ( `num` int(5) NULL DEFAULT 0 COMMENT '工时', `code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id', PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `id`(`id`) USING BTREE + UNIQUE INDEX `id`(`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工时表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2939,7 +2961,8 @@ CREATE TABLE `pear_task_workflow` ( `update_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `organization_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '组织id', `project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2964,7 +2987,8 @@ CREATE TABLE `pear_task_workflow_rule` ( `update_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `workflow_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '工作流id', `sort` int(10) NULL DEFAULT 0 COMMENT '排序', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流规则表' ROW_FORMAT = Compact; -- ---------------------------- diff --git a/data/pearproject.sql b/data/pearproject.sql index 41dde95..9d5ef93 100644 --- a/data/pearproject.sql +++ b/data/pearproject.sql @@ -11,7 +11,7 @@ Target Server Version : 50726 File Encoding : 65001 - Date: 18/08/2019 21:36:29 + Date: 19/08/2019 10:02:58 */ SET NAMES utf8mb4; @@ -29,7 +29,8 @@ CREATE TABLE `pear_collection` ( `member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '成员id', `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `id`(`id`) USING BTREE + UNIQUE INDEX `id`(`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 113 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '收藏表' ROW_FORMAT = Compact; -- ---------------------------- @@ -54,7 +55,8 @@ CREATE TABLE `pear_department` ( `icon` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图标', `create_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间', `path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '上级路径', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = Compact; -- ---------------------------- @@ -79,7 +81,8 @@ CREATE TABLE `pear_department_member` ( `is_principal` tinyint(1) NULL DEFAULT NULL COMMENT '是否负责人', `is_owner` tinyint(1) NULL DEFAULT 0 COMMENT '拥有者', `authorize` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门-成员表' ROW_FORMAT = Compact; -- ---------------------------- @@ -114,7 +117,8 @@ CREATE TABLE `pear_file` ( `file_url` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '完整地址', `file_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件类型', `deleted_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '删除时间', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '文件表' ROW_FORMAT = Compact; -- ---------------------------- @@ -142,7 +146,8 @@ CREATE TABLE `pear_invite_link` ( `source_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源编码', `create_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间', `over_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '过期时间', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '邀请链接表' ROW_FORMAT = Compact; -- ---------------------------- @@ -213,7 +218,8 @@ CREATE TABLE `pear_member` ( `dingtalk_unionid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '钉钉unionid', `dingtalk_userid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '钉钉用户id', PRIMARY KEY (`id`) USING BTREE, - INDEX `username`(`account`) USING BTREE + INDEX `username`(`account`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 589 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = Compact; -- ---------------------------- @@ -246,7 +252,8 @@ CREATE TABLE `pear_member_account` ( `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像', `position` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职位', `department` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织账号表' ROW_FORMAT = Compact; -- ---------------------------- @@ -342,7 +349,8 @@ CREATE TABLE `pear_organization` ( `province` int(10) NULL DEFAULT 0 COMMENT '省', `city` int(10) NULL DEFAULT 0 COMMENT '市', `area` int(10) NULL DEFAULT 0 COMMENT '区', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织表' ROW_FORMAT = Compact; -- ---------------------------- @@ -384,7 +392,8 @@ CREATE TABLE `pear_project` ( `begin_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目开始日期', `end_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目截止日期', PRIMARY KEY (`id`) USING BTREE, - INDEX `project`(`order`) USING BTREE + INDEX `project`(`order`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 13043 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目表' ROW_FORMAT = Compact; -- ---------------------------- @@ -1209,7 +1218,7 @@ CREATE TABLE `pear_project_collection` ( `member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '成员id', `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '加入时间', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 48 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-收藏表' ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-收藏表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of pear_project_collection @@ -1242,8 +1251,9 @@ CREATE TABLE `pear_project_features` ( `update_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `organization_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '组织id', `project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '版本库表' ROW_FORMAT = Compact; + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '版本库表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of pear_project_features @@ -1269,7 +1279,8 @@ CREATE TABLE `pear_project_log` ( `project_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `icon` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `is_robot` tinyint(1) NULL DEFAULT 0 COMMENT '是否机器人', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4468 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = Compact; -- ---------------------------- @@ -1878,7 +1889,8 @@ CREATE TABLE `pear_project_member` ( `join_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '加入时间', `is_owner` int(11) NULL DEFAULT 0 COMMENT '拥有者', `authorize` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `unique`(`project_code`, `member_code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-成员表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2171,7 +2183,8 @@ CREATE TABLE `pear_project_report` ( `create_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `update_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `union`(`project_code`, `date`) USING BTREE + UNIQUE INDEX `union`(`project_code`, `date`) USING BTREE, + INDEX `code`(`project_code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目报表统计表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2189,7 +2202,8 @@ CREATE TABLE `pear_project_template` ( `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面', `member_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建人', `is_system` tinyint(1) NULL DEFAULT 0 COMMENT '系统默认', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目类型表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2218,7 +2232,8 @@ CREATE TABLE `pear_project_version` ( `schedule` int(3) NULL DEFAULT 0 COMMENT '进度百分比', `plan_publish_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预计发布时间', `features_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本库编号', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目版本表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2244,7 +2259,8 @@ CREATE TABLE `pear_project_version_log` ( `project_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目编号', `icon` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `features_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本库编号', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2281,7 +2297,8 @@ CREATE TABLE `pear_source_link` ( `create_by` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', `create_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间', `sort` int(11) NULL DEFAULT 0 COMMENT '排序', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '资源关联表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2383,7 +2400,7 @@ CREATE TABLE `pear_task` ( `features_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '版本库id', `work_time` int(5) NULL DEFAULT 0 COMMENT '预估工时', PRIMARY KEY (`id`, `project_code`) USING BTREE, - INDEX `task`(`code`) USING BTREE + UNIQUE INDEX `task`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 12363 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2782,7 +2799,8 @@ CREATE TABLE `pear_task_stages` ( `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间', `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号', `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标记', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 77 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2837,7 +2855,8 @@ CREATE TABLE `pear_task_stages_template` ( `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sort` int(11) NULL DEFAULT 0, `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 84 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表模板表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2877,8 +2896,9 @@ CREATE TABLE `pear_task_tag` ( `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名', `color` enum('blue','red','orange','green','brown','purple') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'blue' COMMENT '颜色', `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签表' ROW_FORMAT = Compact; + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of pear_task_tag @@ -2897,7 +2917,8 @@ CREATE TABLE `pear_task_to_tag` ( `task_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0', `tag_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0', `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 138 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签映射表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2924,7 +2945,8 @@ CREATE TABLE `pear_task_work_time` ( `num` int(5) NULL DEFAULT 0 COMMENT '工时', `code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id', PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `id`(`id`) USING BTREE + UNIQUE INDEX `id`(`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工时表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2939,7 +2961,8 @@ CREATE TABLE `pear_task_workflow` ( `update_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `organization_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '组织id', `project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流表' ROW_FORMAT = Compact; -- ---------------------------- @@ -2964,7 +2987,8 @@ CREATE TABLE `pear_task_workflow_rule` ( `update_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `workflow_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '工作流id', `sort` int(10) NULL DEFAULT 0 COMMENT '排序', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `code`(`code`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流规则表' ROW_FORMAT = Compact; -- ----------------------------