From 73e3fb126f717d309ff39135aeab386b6816ecf9 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 7 Jul 2021 10:22:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=91=98=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=88=86=E6=9E=90=20=E8=A1=A8=E6=B7=BB=E5=8A=A0=E5=94=AF?= =?UTF-8?q?=E4=B8=80=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.21__grid_member_statistics.sql | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.21__grid_member_statistics.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.21__grid_member_statistics.sql index 640761cddd..c8c90b5370 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.21__grid_member_statistics.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.21__grid_member_statistics.sql @@ -1,3 +1,4 @@ +#网格员数据分析需求 脚本 2021-07-06 CREATE TABLE `fact_grid_member_statistics_daily` ( `ID` varchar(64) NOT NULL COMMENT '主键(t-1)', @@ -32,7 +33,9 @@ CREATE TABLE `fact_grid_member_statistics_daily` PRIMARY KEY (`ID`) USING BTREE ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='网格员数据统计_日统计'; - +#添加唯一索引 +ALTER TABLE `epmet_data_statistical`.`fact_grid_member_statistics_daily` + ADD UNIQUE INDEX `unx_staff`(`DATE_ID`, `STAFF_ID`, `GRID_ID`) USING BTREE; ALTER TABLE `epmet_data_statistical`.`fact_origin_project_main_daily` - ADD COLUMN `PROJECT_CREATOR` varchar(32) NULL COMMENT '项目创建人(议题转项目或立项人)' AFTER `IS_SATISFIED`; \ No newline at end of file + ADD COLUMN `PROJECT_CREATOR` varchar(32) NULL COMMENT '项目创建人(议题转项目或立项人)' AFTER `IS_SATISFIED`;