You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by he...@apache.org on 2023/10/07 09:32:17 UTC

[shenyu] branch master updated: add alert notice upgrade sql script (#5184)

This is an automated email from the ASF dual-hosted git repository.

hefengen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new 790c732b51 add alert notice upgrade sql script (#5184)
790c732b51 is described below

commit 790c732b51831aaae718d7e7065b06f88b80bba1
Author: tomsun28 <to...@outlook.com>
AuthorDate: Sat Oct 7 17:32:09 2023 +0800

    add alert notice upgrade sql script (#5184)
    
    Co-authored-by: dragon-zhang <zh...@apache.org>
    Co-authored-by: moremind <he...@apache.org>
---
 db/upgrade/2.6.0-upgrade-2.6.1-mysql.sql  | 55 +++++++++++++++++++-
 db/upgrade/2.6.0-upgrade-2.6.1-og.sql     | 62 ++++++++++++++++++++++-
 db/upgrade/2.6.0-upgrade-2.6.1-oracle.sql | 83 ++++++++++++++++++++++++++++++-
 db/upgrade/2.6.0-upgrade-2.6.1-pg.sql     | 62 ++++++++++++++++++++++-
 db/upgrade/2.6.1-upgrade-2.6.2-mysql.sql  | 31 ------------
 db/upgrade/2.6.1-upgrade-2.6.2-og.sql     | 32 ------------
 db/upgrade/2.6.1-upgrade-2.6.2-oracle.sql | 32 ------------
 db/upgrade/2.6.1-upgrade-2.6.2-pg.sql     | 32 ------------
 db/upgrade/upgrade-guide.md               | 37 ++++++++++++++
 9 files changed, 295 insertions(+), 131 deletions(-)

diff --git a/db/upgrade/2.6.0-upgrade-2.6.1-mysql.sql b/db/upgrade/2.6.0-upgrade-2.6.1-mysql.sql
index e31e484768..d5b03dd5bf 100755
--- a/db/upgrade/2.6.0-upgrade-2.6.1-mysql.sql
+++ b/db/upgrade/2.6.0-upgrade-2.6.1-mysql.sql
@@ -31,4 +31,57 @@ UPDATE `shenyu`.`plugin_handle` SET `plugin_id` = '32', `field` = 'indexName', `
 UPDATE `shenyu`.`plugin_handle` SET `plugin_id` = '6', `field` = 'loadBalance', `label` = 'loadStrategy', `data_type` = 3, `type` = 2, `sort` = 0, `ext_obj` = NULL, `date_created` = '2022-06-19 22:00:00.000', `date_updated` = '2023-08-31 22:28:28.353' WHERE `plugin_id` = '6' and field = 'loadbalance';
 INSERT INTO `plugin_handle` VALUES ('1529402613204173923', '6', 'retries', 'retries', 3, 2, 0, NULL, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin_handle` VALUES ('1529402613204173924', '6', 'timeout', 'timeout', 3, 2, 0, NULL, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
---dubbbo plugin end
\ No newline at end of file
+--dubbbo plugin end
+
+--alert notice menu
+INSERT INTO `resource` VALUES ('1697141926247763968','1346776175553376256','SHENYU.MENU.SYSTEM.MANAGMENT.ALERT','','/system/alert','',1,3,'alert',0,0,'',1, '2023-08-31 14:59:01','2023-08-31 06:59:01');
+INSERT INTO `resource` VALUES ('1697146375729025024', '1697141926247763968', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, 'unordered-list', 1, 0, 'system:alert:list', 1, '2023-08-31 15:16:42', '2023-08-31 07:22:07');
+INSERT INTO `resource` VALUES ('1697145808210333696','1697141926247763968','SHENYU.BUTTON.SYSTEM.ADD','','','',2,0,'plus',1,0,'system:alert:add',1, '2023-08-31 15:14:26','2023-08-31 07:14:26');
+INSERT INTO `resource` VALUES ('1697146617513873408','1697141926247763968','SHENYU.BUTTON.SYSTEM.DELETE','','','',2,0,'delete',1,0,'system:alert:delete',1, '2023-08-31 15:17:39','2023-08-31 07:22:07');
+INSERT INTO `resource` VALUES ('1697146860540235776','1697141926247763968','SHENYU.BUTTON.SYSTEM.EDIT','','','',2,0,'edit',1,0,'system:alert:edit',1, '2023-08-31 15:18:37','2023-08-31 07:18:37');
+
+INSERT INTO `permission` VALUES ('1697141926281318400','1346358560427216896','1697141926247763968', '2023-08-31 14:59:01', '2023-08-31 06:59:01');
+INSERT INTO `permission` VALUES ('1697145808239693824','1346358560427216896','1697145808210333696', '2023-08-31 15:14:26', '2023-08-31 07:14:26');
+INSERT INTO `permission` VALUES ('1697146375754190848','1346358560427216896','1697146375729025024', '2023-08-31 15:16:42', '2023-08-31 07:16:42');
+INSERT INTO `permission` VALUES ('1697146617543233536','1346358560427216896','1697146617513873408', '2023-08-31 15:17:39', '2023-08-31 07:17:39');
+INSERT INTO `permission` VALUES ('1697146860569595904','1346358560427216896','1697146860540235776', '2023-08-31 15:18:37', '2023-08-31 07:18:37');
+--alert notice menu end
+
+-- add percentage field for rewrite plugin
+INSERT INTO `plugin_handle` VALUES ('1697146860569596304', '3', 'percentage', 'percentage', 1, 2, 3, NULL, '2023-09-15 20:25:53', '2023-09-15 20:25:53');
+
+-- ----------------------------
+-- Table structure for alert_receiver
+-- ----------------------------
+DROP TABLE IF EXISTS `alert_receiver`;
+CREATE TABLE IF NOT EXISTS `alert_receiver`
+(
+    `id`                   varchar(128)   NOT NULL COMMENT 'primary key id',
+    `name`                 varchar(255)   NOT NULL COMMENT 'name',
+    `enable`               tinyint(4)     NOT NULL COMMENT 'enable or not',
+    `type`                 tinyint(4)     NOT NULL COMMENT 'notice type 0-SMS 1-Email 2-webhook 3-WeChat Official Account 4-Enterprise WeChat Robot 5-DingTalk Robot 6-FeiShu Robot 7-Telegram Bot 8-SlackWebHook 9-Discord Bot 10-Enterprise WeChat',
+    `phone`                varchar(255)   COMMENT 'phone',
+    `email`                varchar(255)   COMMENT 'email',
+    `hook_url`             varchar(255)   COMMENT 'hook url',
+    `wechat_id`            varchar(255)   COMMENT 'wechat id',
+    `access_token`         varchar(255)   COMMENT 'access token',
+    `tg_bot_token`         varchar(255)   COMMENT 'tg bot token',
+    `tg_user_id`           varchar(255)   COMMENT 'tg user id',
+    `slack_web_hook_url`   varchar(255)   COMMENT 'slack web hook url',
+    `corp_id`              varchar(255)   COMMENT 'corp id',
+    `agent_id`             varchar(255)   COMMENT 'agent id',
+    `app_secret`           varchar(255)   COMMENT 'app secret',
+    `discord_channel_id`   varchar(255)   COMMENT 'discord channel id',
+    `discord_bot_token`    varchar(255)   COMMENT 'discord bot token',
+    `smn_ak`               varchar(255)   COMMENT 'smn ak',
+    `smn_sk`               varchar(255)   COMMENT 'smn sk',
+    `smn_project_id`       varchar(255)   COMMENT 'smn project id',
+    `smn_region`           varchar(255)   COMMENT 'smn region',
+    `smn_topic_urn`        varchar(255)   COMMENT 'smn topic urn',
+    `match_all`            tinyint(4)     NOT NULL COMMENT 'match all or not',
+    `labels`               varchar(255)   COMMENT 'labels',
+    `levels`               varchar(255)   COMMENT 'levels',
+    `date_created` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'create time',
+    `date_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT 'update time',
+    PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
diff --git a/db/upgrade/2.6.0-upgrade-2.6.1-og.sql b/db/upgrade/2.6.0-upgrade-2.6.1-og.sql
index 6174d9c457..0c72650c6c 100644
--- a/db/upgrade/2.6.0-upgrade-2.6.1-og.sql
+++ b/db/upgrade/2.6.0-upgrade-2.6.1-og.sql
@@ -32,4 +32,64 @@ UPDATE "public"."plugin_handle" SET plugin_id = '32', field = 'indexName', label
 UPDATE "public"."plugin_handle" SET plugin_id = '6', field = 'loadBalance', label = 'loadStrategy', data_type = 3, type = 2, sort = 0, ext_obj = NULL, date_created = '2022-06-19 22:00:00.000', date_updated = '2023-08-31 22:28:28.353' WHERE plugin_id = '6' AND field = 'loadbalance';
 INSERT INTO "public"."plugin_handle" VALUES ('1529402613204173923', '6', 'timeout', 'timeout', 3, 2, 0, NULL, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529402613204173924', '6', 'retries', 'retries', 3, 2, 0, NULL, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
---dubbo plugin end
\ No newline at end of file
+--dubbo plugin end
+
+--alert notice menu
+INSERT INTO "public"."resource" VALUES ('1697141926247763968','1346776175553376256','SHENYU.MENU.SYSTEM.MANAGMENT.ALERT','','/system/alert','',1,3,'alert',0,0,'',1,'2023-08-31 14:59:01.245','2023-08-31 06:59:01.249');
+INSERT INTO "public"."resource" VALUES ('1697146375729025024', '1697141926247763968', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, 'unordered-list', 1, 0, 'system:alert:list', 1, '2023-08-31 15:16:42.249', '2023-08-31 07:22:07.249');
+INSERT INTO "public"."resource" VALUES ('1697145808210333696','1697141926247763968','SHENYU.BUTTON.SYSTEM.ADD','','','',2,0,'plus',1,0,'system:alert:add',1,'2023-08-31 15:14:26.778','2023-08-31 07:14:26.780');
+INSERT INTO "public"."resource" VALUES ('1697146617513873408','1697141926247763968','SHENYU.BUTTON.SYSTEM.DELETE','','','',2,0,'delete',1,0,'system:alert:delete',1,'2023-08-31 15:17:39.731','2023-08-31 07:22:07.675');
+INSERT INTO "public"."resource" VALUES ('1697146860540235776','1697141926247763968','SHENYU.BUTTON.SYSTEM.EDIT','','','',2,0,'edit',1,0,'system:alert:edit',1,'2023-08-31 15:18:37.673','2023-08-31 07:18:37.675');
+
+INSERT INTO "public"."permission" VALUES ('1697141926281318400','1346358560427216896','1697141926247763968', '2023-08-31 14:59:01', '2023-08-31 06:59:01');
+INSERT INTO "public"."permission" VALUES ('1697145808239693824','1346358560427216896','1697145808210333696', '2023-08-31 15:14:26', '2023-08-31 07:14:26');
+INSERT INTO "public"."permission" VALUES ('1697146375754190848','1346358560427216896','1697146375729025024', '2023-08-31 15:16:42', '2023-08-31 07:16:42');
+INSERT INTO "public"."permission" VALUES ('1697146617543233536','1346358560427216896','1697146617513873408', '2023-08-31 15:17:39', '2023-08-31 07:17:39');
+INSERT INTO "public"."permission" VALUES ('1697146860569595904','1346358560427216896','1697146860540235776', '2023-08-31 15:18:37', '2023-08-31 07:18:37');
+--alert notice menu end
+
+-- add percentage field for rewrite plugin
+INSERT INTO "public"."plugin_handle" VALUES ('1697146860569596304', '3', 'percentage', 'percentage', 1, 2, 3, NULL, '2023-09-15 20:25:53', '2023-09-15 20:25:53');
+
+-- ----------------------------
+-- Table structure for alert_receiver
+-- ----------------------------
+DROP TABLE IF EXISTS "public"."alert_receiver";
+CREATE TABLE "public"."alert_receiver"
+(
+    "id"                   varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
+    "name"                 varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
+    "enable"               int4     NOT NULL,
+    "type"                 int4     NOT NULL,
+    "phone"                varchar(255) COLLATE "pg_catalog"."default",
+    "email"                varchar(255) COLLATE "pg_catalog"."default",
+    "hook_url"             varchar(255) COLLATE "pg_catalog"."default",
+    "wechat_id"            varchar(255) COLLATE "pg_catalog"."default",
+    "access_token"         varchar(255) COLLATE "pg_catalog"."default",
+    "tg_bot_token"         varchar(255) COLLATE "pg_catalog"."default",
+    "tg_user_id"           varchar(255) COLLATE "pg_catalog"."default",
+    "slack_web_hook_url"   varchar(255) COLLATE "pg_catalog"."default",
+    "corp_id"              varchar(255) COLLATE "pg_catalog"."default",
+    "agent_id"             varchar(255) COLLATE "pg_catalog"."default",
+    "app_secret"           varchar(255) COLLATE "pg_catalog"."default",
+    "discord_channel_id"   varchar(255) COLLATE "pg_catalog"."default",
+    "discord_bot_token"    varchar(255) COLLATE "pg_catalog"."default",
+    "smn_ak"               varchar(255) COLLATE "pg_catalog"."default",
+    "smn_sk"               varchar(255) COLLATE "pg_catalog"."default",
+    "smn_project_id"       varchar(255) COLLATE "pg_catalog"."default",
+    "smn_region"           varchar(255) COLLATE "pg_catalog"."default",
+    "smn_topic_urn"        varchar(255) COLLATE "pg_catalog"."default",
+    "match_all"            int4      NOT NULL,
+    "labels"               varchar(255) COLLATE "pg_catalog"."default",
+    "levels"               varchar(255) COLLATE "pg_catalog"."default",
+    "date_created"  timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone),
+    "date_updated"  timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone)
+)
+;
+COMMENT ON COLUMN "public"."alert_receiver"."id" IS 'primary key id';
+COMMENT ON COLUMN "public"."alert_receiver"."name" IS 'alarm receiver name';
+COMMENT ON COLUMN "public"."alert_receiver"."enable" IS 'enable or not';
+COMMENT ON COLUMN "public"."alert_receiver"."type" IS 'notice type 0-SMS 1-Email 2-webhook 3-WeChat Official Account 4-Enterprise WeChat Robot 5-DingTalk Robot 6-FeiShu Robot 7-Telegram Bot 8-SlackWebHook 9-Discord Bot 10-Enterprise WeChat';
+COMMENT ON COLUMN "public"."alert_receiver"."match_all" IS 'match all or not';
+COMMENT ON COLUMN "public"."alert_receiver"."date_created" IS 'create time';
+COMMENT ON COLUMN "public"."alert_receiver"."date_updated" IS 'update time';
diff --git a/db/upgrade/2.6.0-upgrade-2.6.1-oracle.sql b/db/upgrade/2.6.0-upgrade-2.6.1-oracle.sql
index bb7cc2550d..a4ae8f9c22 100755
--- a/db/upgrade/2.6.0-upgrade-2.6.1-oracle.sql
+++ b/db/upgrade/2.6.0-upgrade-2.6.1-oracle.sql
@@ -44,4 +44,85 @@ values ('1529402613204173924', '6', 'retries', 'retries', 3, 2, 0, null);
 
 insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) */ into plugin_handle (ID, PLUGIN_ID, FIELD, LABEL, DATA_TYPE, TYPE, SORT, EXT_OBJ)
 values ('1529402613204173925', '6', 'loadBalance', 'loadStrategy', 3, 2, 0, null);
---dubbo plugin end
\ No newline at end of file
+--dubbo plugin end
+
+--alert notice menu
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource"  (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES ('1697141926247763968','1346776175553376256','SHENYU.MENU.SYSTEM.MANAGMENT.ALERT','','/system/alert','',1,3,'alert',0,0,'',1);
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource"  (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES ('1697146375729025024', '1697141926247763968', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, 'unordered-list', 1, 0, 'system:alert:list', 1);
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource"  (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES ('1697145808210333696','1697141926247763968','SHENYU.BUTTON.SYSTEM.ADD','','','',2,0,'plus',1,0,'system:alert:add',1);
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource"  (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES ('1697146617513873408','1697141926247763968','SHENYU.BUTTON.SYSTEM.DELETE','','','',2,0,'delete',1,0,'system:alert:delete',1);
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource"  (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES ('1697146860540235776','1697141926247763968','SHENYU.BUTTON.SYSTEM.EDIT','','','',2,0,'edit',1,0,'system:alert:edit',1);
+
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1697141926281318400', '1346358560427216896', '1697141926247763968');
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1697145808239693824', '1346358560427216896', '1697145808210333696');
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1697146375754190848', '1346358560427216896', '1697146375729025024');
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1697146617543233536', '1346358560427216896', '1697146617513873408');
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1697146860569595904', '1346358560427216896', '1697146860540235776');
+--alert notice menu end
+
+-- add percentage field for rewrite plugin
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) */ INTO plugin_handle (id, plugin_id, field, label, data_type, type, sort, ext_obj) VALUES ('1697146860569596304', '3', 'percentage', 'percentage', 1, 2, 3, null);
+
+-- ----------------------------
+-- Table structure for alert_receiver
+-- ----------------------------
+create table alert_receiver
+(
+    id                   varchar(128)   not null,
+    name                 varchar(255)   not null,
+    enable               NUMBER(10)     not null,
+    type                 NUMBER(10)     not null,
+    phone                varchar(255),
+    email                varchar(255),
+    hook_url             varchar(255),
+    wechat_id            varchar(255),
+    access_token         varchar(255),
+    tg_bot_token         varchar(255),
+    tg_user_id           varchar(255),
+    slack_web_hook_url   varchar(255),
+    corp_id              varchar(255),
+    agent_id             varchar(255),
+    app_secret           varchar(255),
+    discord_channel_id   varchar(255),
+    discord_bot_token    varchar(255),
+    smn_ak               varchar(255),
+    smn_sk               varchar(255),
+    smn_project_id       varchar(255),
+    smn_region           varchar(255),
+    smn_topic_urn        varchar(255),
+    match_all            NUMBER(10),
+    labels               varchar(255),
+    levels               varchar(255),
+    date_created      timestamp(3) default SYSDATE not null,
+    date_updated      timestamp(3) default SYSDATE not null,
+    PRIMARY KEY (id)
+)
+;
+-- Add comments to the columns
+comment
+on column alert_receiver.id
+  is 'primary key id';
+comment
+on column alert_receiver.name
+  is 'alert receiver name';
+comment
+on column alert_receiver.enable
+  is 'enable or not';
+comment
+on column alert_receiver.type
+  is 'notice type 0-SMS 1-Email 2-webhook 3-WeChat Official Account 4-Enterprise WeChat Robot 5-DingTalk Robot 6-FeiShu Robot 7-Telegram Bot 8-SlackWebHook 9-Discord Bot 10-Enterprise WeChat';
+comment
+on column alert_receiver.match_all
+  is 'enable or not';
+comment
+on column alert_receiver.labels
+  is 'alarm labels';
+comment
+on column alert_receiver.levels
+  is 'alarm levels';
+comment
+on column alert_receiver.date_created
+  is 'create time';
+comment
+on column alert_receiver.date_updated
+  is 'update time';
diff --git a/db/upgrade/2.6.0-upgrade-2.6.1-pg.sql b/db/upgrade/2.6.0-upgrade-2.6.1-pg.sql
index 08e33fcb79..db14376b21 100755
--- a/db/upgrade/2.6.0-upgrade-2.6.1-pg.sql
+++ b/db/upgrade/2.6.0-upgrade-2.6.1-pg.sql
@@ -34,4 +34,64 @@ UPDATE "public"."plugin_handle" SET plugin_id = '6', field = 'loadBalance', labe
 DELETE FROM "public"."plugin_handle" WHERE id = 1529403902779330602;
 INSERT INTO "public"."plugin_handle" VALUES ('1529402613204173923', '6', 'retries', 'retries', 3, 2, 0, NULL, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529402613204173924', '6', 'timeout', 'timeout', 3, 2, 0, NULL, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
---dubbo plugin end
\ No newline at end of file
+--dubbo plugin end
+
+--alert notice menu
+INSERT INTO "public"."resource" VALUES ('1697141926247763968','1346776175553376256','SHENYU.MENU.SYSTEM.MANAGMENT.ALERT','','/system/alert','',1,3,'alert',0,0,'',1,'2023-08-31 14:59:01','2023-08-31 06:59:01');
+INSERT INTO "public"."resource" VALUES ('1697146375729025024', '1697141926247763968', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, 'unordered-list', 1, 0, 'system:alert:list', 1, '2023-08-31 15:16:42', '2023-08-31 07:22:07');
+INSERT INTO "public"."resource" VALUES ('1697145808210333696','1697141926247763968','SHENYU.BUTTON.SYSTEM.ADD','','','',2,0,'plus',1,0,'system:alert:add',1,'2023-08-31 15:14:26','2023-08-31 07:14:26');
+INSERT INTO "public"."resource" VALUES ('1697146617513873408','1697141926247763968','SHENYU.BUTTON.SYSTEM.DELETE','','','',2,0,'delete',1,0,'system:alert:delete',1,'2023-08-31 15:17:39','2023-08-31 07:22:07');
+INSERT INTO "public"."resource" VALUES ('1697146860540235776','1697141926247763968','SHENYU.BUTTON.SYSTEM.EDIT','','','',2,0,'edit',1,0,'system:alert:edit',1,'2023-08-31 15:18:37','2023-08-31 07:18:37');
+
+INSERT INTO "public"."permission" VALUES ('1697141926281318400', '1346358560427216896', '1697141926247763968', '2023-08-31 14:59:01', '2023-08-31 06:59:01');
+INSERT INTO "public"."permission" VALUES ('1697145808239693824', '1346358560427216896', '1697145808210333696', '2023-08-31 15:14:26', '2023-08-31 07:14:26');
+INSERT INTO "public"."permission" VALUES ('1697146375754190848', '1346358560427216896', '1697146375729025024', '2023-08-31 15:16:42', '2023-08-31 07:16:42');
+INSERT INTO "public"."permission" VALUES ('1697146617543233536', '1346358560427216896', '1697146617513873408', '2023-08-31 15:17:39', '2023-08-31 07:17:39');
+INSERT INTO "public"."permission" VALUES ('1697146860569595904', '1346358560427216896', '1697146860540235776', '2023-08-31 15:18:37', '2023-08-31 07:18:37');
+--alert notice menu end
+
+-- add percentage field for rewrite plugin
+INSERT INTO "public"."plugin_handle" VALUES ('1697146860569596304', '3', 'percentage', 'percentage', 1, 2, 3, NULL, '2023-09-15 20:25:53', '2023-09-15 20:25:53');
+
+-- ----------------------------
+-- Table structure for alert_receiver
+-- ----------------------------
+DROP TABLE IF EXISTS "public"."alert_receiver";
+CREATE TABLE "public"."alert_receiver"
+(
+    "id"                   varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
+    "name"                 varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
+    "enable"               int4     NOT NULL,
+    "type"                 int4     NOT NULL,
+    "phone"                varchar(255) COLLATE "pg_catalog"."default",
+    "email"                varchar(255) COLLATE "pg_catalog"."default",
+    "hook_url"             varchar(255) COLLATE "pg_catalog"."default",
+    "wechat_id"            varchar(255) COLLATE "pg_catalog"."default",
+    "access_token"         varchar(255) COLLATE "pg_catalog"."default",
+    "tg_bot_token"         varchar(255) COLLATE "pg_catalog"."default",
+    "tg_user_id"           varchar(255) COLLATE "pg_catalog"."default",
+    "slack_web_hook_url"   varchar(255) COLLATE "pg_catalog"."default",
+    "corp_id"              varchar(255) COLLATE "pg_catalog"."default",
+    "agent_id"             varchar(255) COLLATE "pg_catalog"."default",
+    "app_secret"           varchar(255) COLLATE "pg_catalog"."default",
+    "discord_channel_id"   varchar(255) COLLATE "pg_catalog"."default",
+    "discord_bot_token"    varchar(255) COLLATE "pg_catalog"."default",
+    "smn_ak"               varchar(255) COLLATE "pg_catalog"."default",
+    "smn_sk"               varchar(255) COLLATE "pg_catalog"."default",
+    "smn_project_id"       varchar(255) COLLATE "pg_catalog"."default",
+    "smn_region"           varchar(255) COLLATE "pg_catalog"."default",
+    "smn_topic_urn"        varchar(255) COLLATE "pg_catalog"."default",
+    "match_all"            int4      NOT NULL,
+    "labels"               varchar(255) COLLATE "pg_catalog"."default",
+    "levels"               varchar(255) COLLATE "pg_catalog"."default",
+    "date_created"  timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone),
+    "date_updated"  timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone)
+)
+;
+COMMENT ON COLUMN "public"."alert_receiver"."id" IS 'primary key id';
+COMMENT ON COLUMN "public"."alert_receiver"."name" IS 'alarm receiver name';
+COMMENT ON COLUMN "public"."alert_receiver"."enable" IS 'enable or not';
+COMMENT ON COLUMN "public"."alert_receiver"."type" IS 'notice type 0-SMS 1-Email 2-webhook 3-WeChat Official Account 4-Enterprise WeChat Robot 5-DingTalk Robot 6-FeiShu Robot 7-Telegram Bot 8-SlackWebHook 9-Discord Bot 10-Enterprise WeChat';
+COMMENT ON COLUMN "public"."alert_receiver"."match_all" IS 'match all or not';
+COMMENT ON COLUMN "public"."alert_receiver"."date_created" IS 'create time';
+COMMENT ON COLUMN "public"."alert_receiver"."date_updated" IS 'update time';
diff --git a/db/upgrade/2.6.1-upgrade-2.6.2-mysql.sql b/db/upgrade/2.6.1-upgrade-2.6.2-mysql.sql
deleted file mode 100755
index 23d92b41b2..0000000000
--- a/db/upgrade/2.6.1-upgrade-2.6.2-mysql.sql
+++ /dev/null
@@ -1,31 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---     http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-
--- this file works for MySQL.
-INSERT INTO `resource` VALUES ('1697141926247763968','1346776175553376256','SHENYU.MENU.SYSTEM.MANAGMENT.ALERT','','/system/alert','',1,3,'alert',0,0,'',1, '2023-08-31 14:59:01','2023-08-31 06:59:01');
-INSERT INTO `resource` VALUES ('1697146375729025024', '1697141926247763968', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, 'unordered-list', 1, 0, 'system:alert:list', 1, '2023-08-31 15:16:42', '2023-08-31 07:22:07');
-INSERT INTO `resource` VALUES ('1697145808210333696','1697141926247763968','SHENYU.BUTTON.SYSTEM.ADD','','','',2,0,'plus',1,0,'system:alert:add',1, '2023-08-31 15:14:26','2023-08-31 07:14:26');
-INSERT INTO `resource` VALUES ('1697146617513873408','1697141926247763968','SHENYU.BUTTON.SYSTEM.DELETE','','','',2,0,'delete',1,0,'system:alert:delete',1, '2023-08-31 15:17:39','2023-08-31 07:22:07');
-INSERT INTO `resource` VALUES ('1697146860540235776','1697141926247763968','SHENYU.BUTTON.SYSTEM.EDIT','','','',2,0,'edit',1,0,'system:alert:edit',1, '2023-08-31 15:18:37','2023-08-31 07:18:37');
-
-INSERT INTO `permission` VALUES ('1697141926281318400','1346358560427216896','1697141926247763968', '2023-08-31 14:59:01', '2023-08-31 06:59:01');
-INSERT INTO `permission` VALUES ('1697145808239693824','1346358560427216896','1697145808210333696', '2023-08-31 15:14:26', '2023-08-31 07:14:26');
-INSERT INTO `permission` VALUES ('1697146375754190848','1346358560427216896','1697146375729025024', '2023-08-31 15:16:42', '2023-08-31 07:16:42');
-INSERT INTO `permission` VALUES ('1697146617543233536','1346358560427216896','1697146617513873408', '2023-08-31 15:17:39', '2023-08-31 07:17:39');
-INSERT INTO `permission` VALUES ('1697146860569595904','1346358560427216896','1697146860540235776', '2023-08-31 15:18:37', '2023-08-31 07:18:37');
-
--- add percentage field for rewrite plugin
-INSERT INTO `plugin_handle` VALUES ('1697146860569596304', '3', 'percentage', 'percentage', 1, 2, 3, NULL, '2023-09-15 20:25:53', '2023-09-15 20:25:53');
\ No newline at end of file
diff --git a/db/upgrade/2.6.1-upgrade-2.6.2-og.sql b/db/upgrade/2.6.1-upgrade-2.6.2-og.sql
deleted file mode 100644
index 8e6b58532f..0000000000
--- a/db/upgrade/2.6.1-upgrade-2.6.2-og.sql
+++ /dev/null
@@ -1,32 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---     http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-
--- this file works for og.
-
-INSERT INTO "public"."resource" VALUES ('1697141926247763968','1346776175553376256','SHENYU.MENU.SYSTEM.MANAGMENT.ALERT','','/system/alert','',1,3,'alert',0,0,'',1,'2023-08-31 14:59:01.245','2023-08-31 06:59:01.249');
-INSERT INTO "public"."resource" VALUES ('1697146375729025024', '1697141926247763968', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, 'unordered-list', 1, 0, 'system:alert:list', 1, '2023-08-31 15:16:42.249', '2023-08-31 07:22:07.249');
-INSERT INTO "public"."resource" VALUES ('1697145808210333696','1697141926247763968','SHENYU.BUTTON.SYSTEM.ADD','','','',2,0,'plus',1,0,'system:alert:add',1,'2023-08-31 15:14:26.778','2023-08-31 07:14:26.780');
-INSERT INTO "public"."resource" VALUES ('1697146617513873408','1697141926247763968','SHENYU.BUTTON.SYSTEM.DELETE','','','',2,0,'delete',1,0,'system:alert:delete',1,'2023-08-31 15:17:39.731','2023-08-31 07:22:07.675');
-INSERT INTO "public"."resource" VALUES ('1697146860540235776','1697141926247763968','SHENYU.BUTTON.SYSTEM.EDIT','','','',2,0,'edit',1,0,'system:alert:edit',1,'2023-08-31 15:18:37.673','2023-08-31 07:18:37.675');
-
-INSERT INTO "public"."permission" VALUES ('1697141926281318400','1346358560427216896','1697141926247763968', '2023-08-31 14:59:01', '2023-08-31 06:59:01');
-INSERT INTO "public"."permission" VALUES ('1697145808239693824','1346358560427216896','1697145808210333696', '2023-08-31 15:14:26', '2023-08-31 07:14:26');
-INSERT INTO "public"."permission" VALUES ('1697146375754190848','1346358560427216896','1697146375729025024', '2023-08-31 15:16:42', '2023-08-31 07:16:42');
-INSERT INTO "public"."permission" VALUES ('1697146617543233536','1346358560427216896','1697146617513873408', '2023-08-31 15:17:39', '2023-08-31 07:17:39');
-INSERT INTO "public"."permission" VALUES ('1697146860569595904','1346358560427216896','1697146860540235776', '2023-08-31 15:18:37', '2023-08-31 07:18:37');
-
--- add percentage field for rewrite plugin
-INSERT INTO "public"."plugin_handle" VALUES ('1697146860569596304', '3', 'percentage', 'percentage', 1, 2, 3, NULL, '2023-09-15 20:25:53', '2023-09-15 20:25:53');
\ No newline at end of file
diff --git a/db/upgrade/2.6.1-upgrade-2.6.2-oracle.sql b/db/upgrade/2.6.1-upgrade-2.6.2-oracle.sql
deleted file mode 100755
index d7042d16b3..0000000000
--- a/db/upgrade/2.6.1-upgrade-2.6.2-oracle.sql
+++ /dev/null
@@ -1,32 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---     http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-
--- this file works for Oracle, can not use "`" syntax.
-
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource"  (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES ('1697141926247763968','1346776175553376256','SHENYU.MENU.SYSTEM.MANAGMENT.ALERT','','/system/alert','',1,3,'alert',0,0,'',1);
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource"  (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES ('1697146375729025024', '1697141926247763968', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, 'unordered-list', 1, 0, 'system:alert:list', 1);
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource"  (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES ('1697145808210333696','1697141926247763968','SHENYU.BUTTON.SYSTEM.ADD','','','',2,0,'plus',1,0,'system:alert:add',1);
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource"  (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES ('1697146617513873408','1697141926247763968','SHENYU.BUTTON.SYSTEM.DELETE','','','',2,0,'delete',1,0,'system:alert:delete',1);
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource"  (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status) VALUES ('1697146860540235776','1697141926247763968','SHENYU.BUTTON.SYSTEM.EDIT','','','',2,0,'edit',1,0,'system:alert:edit',1);
-
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1697141926281318400', '1346358560427216896', '1697141926247763968');
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1697145808239693824', '1346358560427216896', '1697145808210333696');
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1697146375754190848', '1346358560427216896', '1697146375729025024');
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1697146617543233536', '1346358560427216896', '1697146617513873408');
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, object_id, resource_id) VALUES ('1697146860569595904', '1346358560427216896', '1697146860540235776');
-
--- add percentage field for rewrite plugin
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) */ INTO plugin_handle (id, plugin_id, field, label, data_type, type, sort, ext_obj) VALUES ('1697146860569596304', '3', 'percentage', 'percentage', 1, 2, 3, null);
\ No newline at end of file
diff --git a/db/upgrade/2.6.1-upgrade-2.6.2-pg.sql b/db/upgrade/2.6.1-upgrade-2.6.2-pg.sql
deleted file mode 100755
index fad245d05c..0000000000
--- a/db/upgrade/2.6.1-upgrade-2.6.2-pg.sql
+++ /dev/null
@@ -1,32 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---     http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-
--- this file works for PostgreSQL, can not use "`" syntax.
-
-INSERT INTO "public"."resource" VALUES ('1697141926247763968','1346776175553376256','SHENYU.MENU.SYSTEM.MANAGMENT.ALERT','','/system/alert','',1,3,'alert',0,0,'',1,'2023-08-31 14:59:01','2023-08-31 06:59:01');
-INSERT INTO "public"."resource" VALUES ('1697146375729025024', '1697141926247763968', 'SHENYU.BUTTON.SYSTEM.LIST', '', '', '', 2, 0, 'unordered-list', 1, 0, 'system:alert:list', 1, '2023-08-31 15:16:42', '2023-08-31 07:22:07');
-INSERT INTO "public"."resource" VALUES ('1697145808210333696','1697141926247763968','SHENYU.BUTTON.SYSTEM.ADD','','','',2,0,'plus',1,0,'system:alert:add',1,'2023-08-31 15:14:26','2023-08-31 07:14:26');
-INSERT INTO "public"."resource" VALUES ('1697146617513873408','1697141926247763968','SHENYU.BUTTON.SYSTEM.DELETE','','','',2,0,'delete',1,0,'system:alert:delete',1,'2023-08-31 15:17:39','2023-08-31 07:22:07');
-INSERT INTO "public"."resource" VALUES ('1697146860540235776','1697141926247763968','SHENYU.BUTTON.SYSTEM.EDIT','','','',2,0,'edit',1,0,'system:alert:edit',1,'2023-08-31 15:18:37','2023-08-31 07:18:37');
-
-INSERT INTO "public"."permission" VALUES ('1697141926281318400', '1346358560427216896', '1697141926247763968', '2023-08-31 14:59:01', '2023-08-31 06:59:01');
-INSERT INTO "public"."permission" VALUES ('1697145808239693824', '1346358560427216896', '1697145808210333696', '2023-08-31 15:14:26', '2023-08-31 07:14:26');
-INSERT INTO "public"."permission" VALUES ('1697146375754190848', '1346358560427216896', '1697146375729025024', '2023-08-31 15:16:42', '2023-08-31 07:16:42');
-INSERT INTO "public"."permission" VALUES ('1697146617543233536', '1346358560427216896', '1697146617513873408', '2023-08-31 15:17:39', '2023-08-31 07:17:39');
-INSERT INTO "public"."permission" VALUES ('1697146860569595904', '1346358560427216896', '1697146860540235776', '2023-08-31 15:18:37', '2023-08-31 07:18:37');
-
--- add percentage field for rewrite plugin
-INSERT INTO "public"."plugin_handle" VALUES ('1697146860569596304', '3', 'percentage', 'percentage', 1, 2, 3, NULL, '2023-09-15 20:25:53', '2023-09-15 20:25:53');
\ No newline at end of file
diff --git a/db/upgrade/upgrade-guide.md b/db/upgrade/upgrade-guide.md
index 2fb8115b1b..04754be423 100644
--- a/db/upgrade/upgrade-guide.md
+++ b/db/upgrade/upgrade-guide.md
@@ -46,3 +46,40 @@
 
   > this file is the Shenyu upgrade sql from v2.4.1 to v2.4.2
 
+- 2.4.2-upgrade-2.4.3-mysql.sql
+
+- 2.4.2-upgrade-2.4.3-pg.sql
+
+  > this file is the Shenyu upgrade sql from v2.4.2 to v2.4.3
+
+- 2.4.3-upgrade-2.5.0-mysql.sql
+
+- 2.4.3-upgrade-2.5.0-pg.sql
+
+  > this file is the Shenyu upgrade sql from v2.4.3 to v2.5.0
+
+- 2.5.0-upgrade-2.5.1-mysql.sql
+
+- 2.5.0-upgrade-2.5.1-oracle.sql
+
+- 2.5.0-upgrade-2.5.1-pg.sql
+
+  > this file is the Shenyu upgrade sql from v2.5.0 to v2.5.1
+
+- 2.5.1-upgrade-2.6.0-mysql.sql
+
+- 2.5.1-upgrade-2.6.0-oracle.sql
+
+- 2.5.1-upgrade-2.6.0-pg.sql
+
+  > this file is the Shenyu upgrade sql from v2.5.1 to v2.6.0
+
+- 2.6.0-upgrade-2.6.1-mysql.sql
+
+- 2.6.0-upgrade-2.6.1-og.sql
+
+- 2.6.0-upgrade-2.6.1-oracle.sql
+
+- 2.6.0-upgrade-2.6.1-pg.sql
+
+  > this file is the Shenyu upgrade sql from v2.6.0 to v2.6.1