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 a05fec12ba [issue:5245] fix sql script error
a05fec12ba is described below

commit a05fec12ba42d92ba9db727c0937cd96067fd52d
Author: Kerwin Bryant <[email protected]>
AuthorDate: Tue Oct 24 09:25:15 2023 +0800

    [issue:5245] fix sql script error
    
    Co-authored-by: moremind <[email protected]>
---
 db/init/mysql/schema.sql                                 | 4 ++--
 db/init/og/create-table.sql                              | 4 ++--
 db/init/oracle/schema.sql                                | 4 ++--
 db/init/pg/create-table.sql                              | 4 ++--
 db/upgrade/2.6.0-upgrade-2.6.1-mysql.sql                 | 4 ++++
 db/upgrade/2.6.0-upgrade-2.6.1-og.sql                    | 4 ++++
 db/upgrade/2.6.0-upgrade-2.6.1-oracle.sql                | 6 ++++++
 db/upgrade/2.6.0-upgrade-2.6.1-pg.sql                    | 4 ++++
 shenyu-admin/src/main/resources/sql-script/h2/schema.sql | 4 ++--
 9 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/db/init/mysql/schema.sql b/db/init/mysql/schema.sql
index 9d9b6c9937..4b54927e7d 100644
--- a/db/init/mysql/schema.sql
+++ b/db/init/mysql/schema.sql
@@ -861,9 +861,9 @@ CREATE TABLE `plugin_handle`  (
 -- ----------------------------
 INSERT INTO `plugin_handle` VALUES ('1529402613195784246', '10', 
'flowRuleGrade', 'flowRuleGrade', 3, 2, 8, 
'{\"required\":\"1\",\"defaultValue\":\"1\",\"rule\":\"\"}', '2022-05-25 
18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin_handle` VALUES ('1529402613199978496', '10', 
'flowRuleControlBehavior', 'flowRuleControlBehavior', 3, 2, 5, 
'{\"required\":\"1\",\"defaultValue\":\"0\",\"rule\":\"\"}', '2022-05-25 
18:02:53', '2022-05-25 18:02:53');
-INSERT INTO `plugin_handle` VALUES ('1529402613199978497', '10', 
'flowRuleEnable', 'flowRuleEnable 1 or 0)', 1, 2, 7, 
'{\"required\":\"1\",\"defaultValue\":\"1\",\"rule\":\"/^[01]$/\"}', 
'2022-05-25 18:02:53', '2022-05-25 18:02:53');
+INSERT INTO `plugin_handle` VALUES ('1529402613199978497', '10', 
'flowRuleEnable', 'flowRuleEnable 1 or 0', 1, 2, 7, 
'{\"required\":\"1\",\"defaultValue\":\"1\",\"rule\":\"/^[01]$/\"}', 
'2022-05-25 18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin_handle` VALUES ('1529402613199978498', '10', 
'flowRuleCount', 'flowRuleCount', 1, 2, 6, 
'{\"required\":\"1\",\"defaultValue\":\"0\",\"rule\":\"\"}', '2022-05-25 
18:02:53', '2022-05-25 18:02:53');
-INSERT INTO `plugin_handle` VALUES ('1529402613199978499', '10', 
'degradeRuleEnable', 'degradeRuleEnable 1 or 0)', 1, 2, 2, 
'{\"required\":\"1\",\"defaultValue\":\"1\",\"rule\":\"/^[01]$/\"}', 
'2022-05-25 18:02:53', '2022-05-25 18:02:53');
+INSERT INTO `plugin_handle` VALUES ('1529402613199978499', '10', 
'degradeRuleEnable', 'degradeRuleEnable 1 or 0', 1, 2, 2, 
'{\"required\":\"1\",\"defaultValue\":\"1\",\"rule\":\"/^[01]$/\"}', 
'2022-05-25 18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin_handle` VALUES ('1529402613199978500', '10', 
'degradeRuleGrade', 'degradeRuleGrade', 3, 2, 3, 
'{\"required\":\"1\",\"defaultValue\":\"0\",\"rule\":\"\"}', '2022-05-25 
18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin_handle` VALUES ('1529402613199978501', '10', 
'degradeRuleCount', 'degradeRuleCount', 1, 2, 1, 
'{\"required\":\"1\",\"defaultValue\":\"0\",\"rule\":\"\"}', '2022-05-25 
18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin_handle` VALUES ('1529402613199978502', '10', 
'degradeRuleTimeWindow', 'degradeRuleTimeWindow', 1, 2, 4, 
'{\"required\":\"1\",\"defaultValue\":\"0\",\"rule\":\"\"}', '2022-05-25 
18:02:53', '2022-05-25 18:02:53');
diff --git a/db/init/og/create-table.sql b/db/init/og/create-table.sql
index 312a5c7dae..020dda3706 100644
--- a/db/init/og/create-table.sql
+++ b/db/init/og/create-table.sql
@@ -1004,9 +1004,9 @@ COMMENT ON COLUMN "public"."plugin_handle"."date_updated" 
IS 'update time';
 -- ----------------------------
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941952', '10', 
'flowRuleGrade', 'flowRuleGrade', 3, 2, 8, 
'{"required":"1","defaultValue":"1","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941953', '10', 
'flowRuleControlBehavior', 'flowRuleControlBehavior', 3, 2, 5, 
'{"required":"1","defaultValue":"0","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
-INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941954', '10', 
'flowRuleEnable', 'flowRuleEnable 1 or 0)', 1, 2, 7, 
'{"required":"1","defaultValue":"1","rule":"/^[01]$/"}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941954', '10', 
'flowRuleEnable', 'flowRuleEnable 1 or 0', 1, 2, 7, 
'{"required":"1","defaultValue":"1","rule":"/^[01]$/"}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941955', '10', 
'flowRuleCount', 'flowRuleCount', 1, 2, 6, 
'{"required":"1","defaultValue":"0","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
-INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941956', '10', 
'degradeRuleEnable', 'degradeRuleEnable 1 or 0)', 1, 2, 2, 
'{"required":"1","defaultValue":"1","rule":"/^[01]$/"}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941956', '10', 
'degradeRuleEnable', 'degradeRuleEnable 1 or 0', 1, 2, 2, 
'{"required":"1","defaultValue":"1","rule":"/^[01]$/"}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941957', '10', 
'degradeRuleGrade', 'degradeRuleGrade', 3, 2, 3, 
'{"required":"1","defaultValue":"0","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902775136256', '10', 
'degradeRuleCount', 'degradeRuleCount', 1, 2, 1, 
'{"required":"1","defaultValue":"0","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902775136257', '10', 
'degradeRuleTimeWindow', 'degradeRuleTimeWindow', 1, 2, 4, 
'{"required":"1","defaultValue":"0","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
diff --git a/db/init/oracle/schema.sql b/db/init/oracle/schema.sql
index cd41c67753..45d28a4bd6 100644
--- a/db/init/oracle/schema.sql
+++ b/db/init/oracle/schema.sql
@@ -1341,13 +1341,13 @@ insert /*+ 
IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) */
 values ('1518229897206079533', '10', 'flowRuleControlBehavior', 
'flowRuleControlBehavior', 3, 2, 5, 
'{"required":"1","defaultValue":"0","rule":""}');
 
 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 ('1518229897206079534', '10', 'flowRuleEnable', 'flowRuleEnable 1 or 
0)', 1, 2, 7, '{"required":"1","defaultValue":"1","rule":"/^[01]$/"}');
+values ('1518229897206079534', '10', 'flowRuleEnable', 'flowRuleEnable 1 or 
0', 1, 2, 7, '{"required":"1","defaultValue":"1","rule":"/^[01]$/"}');
 
 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 ('1518229897206079535', '10', 'flowRuleCount', 'flowRuleCount', 1, 2, 
6, '{"required":"1","defaultValue":"0","rule":""}');
 
 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 ('1518229897206079536', '10', 'degradeRuleEnable', 'degradeRuleEnable 1 
or 0)', 1, 2, 2, '{"required":"1","defaultValue":"1","rule":"/^[01]$/"}');
+values ('1518229897206079536', '10', 'degradeRuleEnable', 'degradeRuleEnable 1 
or 0', 1, 2, 2, '{"required":"1","defaultValue":"1","rule":"/^[01]$/"}');
 
 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 ('1518229897206079537', '10', 'degradeRuleGrade', 'degradeRuleGrade', 
3, 2, 3, '{"required":"1","defaultValue":"0","rule":""}');
diff --git a/db/init/pg/create-table.sql b/db/init/pg/create-table.sql
index f0ceaee997..458388dcb1 100644
--- a/db/init/pg/create-table.sql
+++ b/db/init/pg/create-table.sql
@@ -1004,9 +1004,9 @@ COMMENT ON COLUMN "public"."plugin_handle"."date_updated" 
IS 'update time';
 -- ----------------------------
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941952', '10', 
'flowRuleGrade', 'flowRuleGrade', 3, 2, 8, 
'{"required":"1","defaultValue":"1","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941953', '10', 
'flowRuleControlBehavior', 'flowRuleControlBehavior', 3, 2, 5, 
'{"required":"1","defaultValue":"0","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
-INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941954', '10', 
'flowRuleEnable', 'flowRuleEnable 1 or 0)', 1, 2, 7, 
'{"required":"1","defaultValue":"1","rule":"/^[01]$/"}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941954', '10', 
'flowRuleEnable', 'flowRuleEnable 1 or 0', 1, 2, 7, 
'{"required":"1","defaultValue":"1","rule":"/^[01]$/"}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941955', '10', 
'flowRuleCount', 'flowRuleCount', 1, 2, 6, 
'{"required":"1","defaultValue":"0","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
-INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941956', '10', 
'degradeRuleEnable', 'degradeRuleEnable 1 or 0)', 1, 2, 2, 
'{"required":"1","defaultValue":"1","rule":"/^[01]$/"}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941956', '10', 
'degradeRuleEnable', 'degradeRuleEnable 1 or 0', 1, 2, 2, 
'{"required":"1","defaultValue":"1","rule":"/^[01]$/"}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902770941957', '10', 
'degradeRuleGrade', 'degradeRuleGrade', 3, 2, 3, 
'{"required":"1","defaultValue":"0","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902775136256', '10', 
'degradeRuleCount', 'degradeRuleCount', 1, 2, 1, 
'{"required":"1","defaultValue":"0","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902775136257', '10', 
'degradeRuleTimeWindow', 'degradeRuleTimeWindow', 1, 2, 4, 
'{"required":"1","defaultValue":"0","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
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 d5b03dd5bf..2faf53f195 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
@@ -85,3 +85,7 @@ CREATE TABLE IF NOT EXISTS `alert_receiver`
     `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;
+
+
+UPDATE `shenyu`.`plugin_handle` SET `label` = 'flowRuleEnable 1 or 0' WHERE 
`id` = '1529402613199978497';
+UPDATE `shenyu`.`plugin_handle` SET `label` = 'degradeRuleEnable 1 or 0' WHERE 
`id` = '1529402613199978499';
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 0c72650c6c..5f2c0b78ea 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
@@ -93,3 +93,7 @@ COMMENT ON COLUMN "public"."alert_receiver"."type" IS 'notice 
type 0-SMS 1-Email
 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';
+
+
+UPDATE "public"."plugin_handle" SET label = 'flowRuleEnable 1 or 0' WHERE id = 
'1529403902770941954';
+UPDATE "public"."plugin_handle" SET label = 'degradeRuleEnable 1 or 0' WHERE 
id = '1529403902770941956';
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 a4ae8f9c22..867bc0df44 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
@@ -126,3 +126,9 @@ on column alert_receiver.date_created
 comment
 on column alert_receiver.date_updated
   is 'update time';
+
+
+update plugin_handle set label = 'flowRuleEnable 1 or 0'
+where id = '1518229897206079534';
+update plugin_handle set label = 'degradeRuleEnable 1 or 0'
+where id = '1518229897206079536';
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 db14376b21..83a80212a2 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
@@ -95,3 +95,7 @@ COMMENT ON COLUMN "public"."alert_receiver"."type" IS 'notice 
type 0-SMS 1-Email
 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';
+
+
+UPDATE "public"."plugin_handle" SET label = 'flowRuleEnable 1 or 0' WHERE id = 
'1529403902770941954';
+UPDATE "public"."plugin_handle" SET label = 'degradeRuleEnable 1 or 0' WHERE 
id = '1529403902770941956';
diff --git a/shenyu-admin/src/main/resources/sql-script/h2/schema.sql 
b/shenyu-admin/src/main/resources/sql-script/h2/schema.sql
index 124b6e3fbd..917133c938 100755
--- a/shenyu-admin/src/main/resources/sql-script/h2/schema.sql
+++ b/shenyu-admin/src/main/resources/sql-script/h2/schema.sql
@@ -553,9 +553,9 @@ INSERT IGNORE INTO `plugin` (`id`, `name`, `role`, `sort`, 
`config`, `enabled`)
 /*insert plugin_handle data for sentinel*/
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613195784246', '10', 'flowRuleGrade', 'flowRuleGrade', 3, 2, 8, 
'{"required":"1","defaultValue":"1","rule":""}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613199978496', '10', 'flowRuleControlBehavior', 
'flowRuleControlBehavior', 3, 2, 5, 
'{"required":"1","defaultValue":"0","rule":""}');
-INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613199978497', '10', 'flowRuleEnable', 'flowRuleEnable 1 or 0)', 1, 2, 
7, '{"required":"1","defaultValue":"1","rule":"/^[01]$/"}');
+INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613199978497', '10', 'flowRuleEnable', 'flowRuleEnable 1 or 0', 1, 2, 
7, '{"required":"1","defaultValue":"1","rule":"/^[01]$/"}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613199978498', '10', 'flowRuleCount', 'flowRuleCount', 1, 2, 6, 
'{"required":"1","defaultValue":"0","rule":""}');
-INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613199978499', '10', 'degradeRuleEnable', 'degradeRuleEnable 1 or 0)', 
1, 2, 2, '{"required":"1","defaultValue":"1","rule":"/^[01]$/"}');
+INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613199978499', '10', 'degradeRuleEnable', 'degradeRuleEnable 1 or 0', 
1, 2, 2, '{"required":"1","defaultValue":"1","rule":"/^[01]$/"}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613199978500', '10', 'degradeRuleGrade', 'degradeRuleGrade', 3, 2, 3, 
'{"required":"1","defaultValue":"0","rule":""}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613199978501', '10', 'degradeRuleCount', 'degradeRuleCount', 1, 2, 1, 
'{"required":"1","defaultValue":"0","rule":""}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613199978502', '10', 'degradeRuleTimeWindow', 'degradeRuleTimeWindow', 
1, 2, 4, '{"required":"1","defaultValue":"0","rule":""}');

Reply via email to