From 287dba9c89cd41cf3681dceb6a87eda79bc2a357 Mon Sep 17 00:00:00 2001 From: tanghc Date: Sat, 31 Oct 2020 18:03:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E8=B7=AF=E7=94=B1=E7=9B=91?= =?UTF-8?q?=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sop-upgrade-4.1.0.sql | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sop-upgrade-4.1.0.sql b/sop-upgrade-4.1.0.sql index ed08f526..e53736b6 100644 --- a/sop-upgrade-4.1.0.sql +++ b/sop-upgrade-4.1.0.sql @@ -18,13 +18,16 @@ CREATE TABLE `monitor_info` ( `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), - UNIQUE KEY `uk_routeid` (`route_id`) USING BTREE, + UNIQUE KEY `uk_routeid` (`route_id`,`instance_id`) USING BTREE, KEY `idex_name` (`name`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='接口监控信息'; + + CREATE TABLE `monitor_info_error` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `error_id` varchar(64) NOT NULL DEFAULT '' COMMENT '错误id,md5Hex(instanceId + routeId + errorMsg)', + `instance_id` varchar(128) NOT NULL DEFAULT '' COMMENT '实例id', `route_id` varchar(128) NOT NULL DEFAULT '', `error_msg` text NOT NULL, `error_status` int(11) NOT NULL DEFAULT '0' COMMENT 'http status,非200错误', @@ -33,6 +36,6 @@ CREATE TABLE `monitor_info_error` ( `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), - UNIQUE KEY `uk_erririd` (`error_id`) USING BTREE, + UNIQUE KEY `uk_errorid` (`error_id`) USING BTREE, KEY `idx_routeid` (`route_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file