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

xiaoyu 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 11688c2ac [ISSUE #3964] fix sql script error (#4011)
11688c2ac is described below

commit 11688c2ac0ba7f3894b74a33b7c3e8536f6d0731
Author: moremind <[email protected]>
AuthorDate: Wed Sep 28 14:15:31 2022 +0800

    [ISSUE #3964] fix sql script error (#4011)
    
    * [ISSUE #3964] fix sql script error
    
    * [ISSUE #3964] fix sql script error
---
 db/init/mysql/schema.sql                  | 2 ++
 db/init/oracle/schema.sql                 | 8 ++------
 db/init/pg/create-table.sql               | 6 ++++--
 db/upgrade/2.5.0-upgrade-2.5.1-mysql.sql  | 4 ++--
 db/upgrade/2.5.0-upgrade-2.5.1-oracle.sql | 6 ++----
 db/upgrade/2.5.0-upgrade-2.5.1-pg.sql     | 4 ++--
 6 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/db/init/mysql/schema.sql b/db/init/mysql/schema.sql
index 10bdd07a0..5ecb4ca8b 100644
--- a/db/init/mysql/schema.sql
+++ b/db/init/mysql/schema.sql
@@ -610,6 +610,7 @@ INSERT INTO `permission` VALUES ('1534585531389583418', 
'1346358560427216896', '
 INSERT INTO `permission` VALUES ('1534585531389583419', '1346358560427216896', 
'1534585531108565051', '2022-05-25 18:02:58', '2022-05-25 18:02:58');
 INSERT INTO `permission` VALUES ('1534585531389583420', '1346358560427216896', 
'1534585531108565052', '2022-05-25 18:02:58', '2022-05-25 18:02:58');
 
+INSERT INTO `permission` VALUES ('1572525965658820608', '1346358560427216896', 
'1572525965625266176', '2022-09-28 11:50:58', '2022-09-28 11:50:58');
 -- ----------------------------
 -- Table structure for plugin
 -- ----------------------------
@@ -1361,6 +1362,7 @@ INSERT INTO `resource` VALUES ('1534585531108565050', 
'1534585531108565043', 'SH
 INSERT INTO `resource` VALUES ('1534585531108565051', '1534585531108565043', 
'SHENYU.BUTTON.PLUGIN.RULE.DELETE', '', '', '', 2, 0, '', 1, 0, 
'plugin:loggingClickHouseRule:delete', 1, '2022-05-25 18:02:58', '2022-05-25 
18:02:58');
 INSERT INTO `resource` VALUES ('1534585531108565052', '1534585531108565043', 
'SHENYU.BUTTON.PLUGIN.SYNCHRONIZE', '', '', '', 2, 0, '', 1, 0, 
'plugin:loggingClickHouse:modify', 1, '2022-05-25 18:02:58', '2022-05-25 
18:02:58');
 
+INSERT INTO `resource` VALUES ('1572525965625266176', '1346777449787125760', 
'SHENYU.BUTTON.SYSTEM.RESOURCE', '', '', '',2, 6, '', 1, 0, 
'system:plugin:resource', 1, '2022-09-28 11:50:58', '2022-09-28 11:50:58');
 -- ----------------------------
 -- Table structure for role
 -- ----------------------------
diff --git a/db/init/oracle/schema.sql b/db/init/oracle/schema.sql
index c62531b8f..d8ec066b7 100644
--- a/db/init/oracle/schema.sql
+++ b/db/init/oracle/schema.sql
@@ -1653,11 +1653,7 @@ INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) 
*/ INTO "resource"  (id,
 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('1534577121923309568', '', 'Document', 
'', '/document', '', 0, 3, 'file-text', 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('1534585430311051264', 
'1534577121923309568', 'API document', '', '/document/apidoc', '', 1, 0, 'api', 
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('1534585531108564992', 
'1534585430311051264', 'send', '', '', '', 2, 0, '', 1, 0, 
'document:apirun:send', 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 ('1572525965625266176', 
'1346777449787125760', 'SHENYU.BUTTON.SYSTEM.RESOURCE', '', '', '', 2, 6, '', 
1, 0, 'system:plugin:resource', 1);
 
 /* default permission */
 INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, 
object_id, resource_id) VALUES ('1351007708572688384', '1346358560427216896', 
'1346775491550474240');
@@ -1718,5 +1714,5 @@ INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ 
INTO permission (id, o
 INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, 
object_id, resource_id) VALUES ('1534577122279825408', '1346358560427216896', 
'1534577121923309568');
 INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, 
object_id, resource_id) VALUES ('1534585430587875328', '1346358560427216896', 
'1534585430311051264');
 INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, 
object_id, resource_id) VALUES ('1534585531389583360', '1346358560427216896', 
'1534585531108564992');
-
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, 
object_id, resource_id) VALUES ('1572525965658820608', '1346358560427216896', 
'1572525965625266176');
 commit;
\ No newline at end of file
diff --git a/db/init/pg/create-table.sql b/db/init/pg/create-table.sql
index a2f327b07..5eae75c10 100644
--- a/db/init/pg/create-table.sql
+++ b/db/init/pg/create-table.sql
@@ -679,6 +679,7 @@ INSERT INTO "public"."permission" VALUES 
('1529403932886044827', '13463585604272
 INSERT INTO "public"."permission" VALUES ('1529403932886044828', 
'1346358560427216896', '1534585531108565051', '2022-06-09 01:17:57', 
'2022-06-09 01:17:56');
 INSERT INTO "public"."permission" VALUES ('1529403932886044829', 
'1346358560427216896', '1534585531108565052', '2022-06-09 01:17:57', 
'2022-06-09 01:17:56');
 
+INSERT INTO "public"."permission" VALUES ('1572525965658820608', 
'1346358560427216896', '1572525965625266176', '2022-09-28 11:50:58', 
'2022-09-28 11:50:58');
 -- ----------------------------
 -- Table structure for plugin
 -- ----------------------------
@@ -692,8 +693,7 @@ CREATE TABLE "public"."plugin" (
   "enabled" int2 NOT NULL,
   "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"."plugin"."id" IS 'primary key id';
 COMMENT ON COLUMN "public"."plugin"."name" IS 'plugin name';
 COMMENT ON COLUMN "public"."plugin"."config" IS 'plugin configuration';
@@ -1466,6 +1466,8 @@ INSERT INTO "public"."resource" VALUES 
('1534585531108565049', '1534585531108565
 INSERT INTO "public"."resource" VALUES ('1534585531108565050', 
'1534585531108565043', 'SHENYU.BUTTON.PLUGIN.RULE.EDIT', '', '', '', 2, 0, '', 
1, 0, 'plugin:loggingClickHouseRule:edit', 1, '2022-05-25 18:08:07', 
'2022-05-25 18:08:07');
 INSERT INTO "public"."resource" VALUES ('1534585531108565051', 
'1534585531108565043', 'SHENYU.BUTTON.PLUGIN.RULE.DELETE', '', '', '', 2, 0, 
'', 1, 0, 'plugin:loggingClickHouseRule:delete', 1, '2022-05-25 18:08:07', 
'2022-05-25 18:08:07');
 INSERT INTO "public"."resource" VALUES ('1534585531108565052', 
'1534585531108565043', 'SHENYU.BUTTON.PLUGIN.SYNCHRONIZE', '', '', '', 2, 0, 
'', 1, 0, 'plugin:loggingClickHouse:modify', 1, '2022-05-25 18:08:07', 
'2022-05-25 18:08:07');
+
+INSERT INTO "public"."resource" VALUES ('1572525965625266176', 
'1346777449787125760', 'SHENYU.BUTTON.SYSTEM.RESOURCE', '', '', '', 2, 6, '', 
1, 0, 'system:plugin:resource', 1, '2022-09-28 11:50:58', '2022-09-28 
11:50:58');
 -- ----------------------------
 -- Table structure for role
 -- ----------------------------
diff --git a/db/upgrade/2.5.0-upgrade-2.5.1-mysql.sql 
b/db/upgrade/2.5.0-upgrade-2.5.1-mysql.sql
index f5e90e915..fcedccb84 100644
--- a/db/upgrade/2.5.0-upgrade-2.5.1-mysql.sql
+++ b/db/upgrade/2.5.0-upgrade-2.5.1-mysql.sql
@@ -87,8 +87,8 @@ INSERT INTO `plugin_handle` VALUES ('1529402613204172743', 
'10', 'flowRuleMaxQue
 INSERT INTO `plugin_handle` VALUES ('1529402613204172744', '10', 
'flowRuleWarmUpPeriodSec', 'flowRuleWarmUpPeriodSec', 1, 2, 6, 
'{\"required\":\"0\",\"defaultValue\":\"10\"}', '2022-05-25 18:02:53', 
'2022-05-25 18:02:53');
 
 /*create plugin resource and permission for admin #3964 */
-INSERT INTO "resource" VALUES 
('1572525965625266176','1346777449787125760','SHENYU.BUTTON.SYSTEM.RESOURCE','','','','2','6','','1','0','system:plugin:resource','1');
-INSERT INTO "permission" VALUES ('1572525965658820608', '1346358560427216896', 
'1572525965625266176');
+INSERT INTO `resource` VALUES ('1572525965625266176', '1346777449787125760', 
'SHENYU.BUTTON.SYSTEM.RESOURCE', '', '', '',2, 6, '', 1, 0, 
'system:plugin:resource', 1, '2022-09-28 11:50:58', '2022-09-28 11:50:58');
+INSERT INTO `permission` VALUES ('1572525965658820608', '1346358560427216896', 
'1572525965625266176', '2022-09-28 11:50:58', '2022-09-28 11:50:58');
 
 /* fix issue 3966 */
 INSERT INTO `plugin_handle` VALUES ('1529402613204172745', '14', 
'addPrefixed', 'addPrefixed', 3, 2, 3, 
'{\"required\":\"1\",\"defaultValue\":\"false\"}', '2022-09-27 12:00:00', 
'2022-09-27 12:00:00');
diff --git a/db/upgrade/2.5.0-upgrade-2.5.1-oracle.sql 
b/db/upgrade/2.5.0-upgrade-2.5.1-oracle.sql
index c5f030915..e28388e51 100644
--- a/db/upgrade/2.5.0-upgrade-2.5.1-oracle.sql
+++ b/db/upgrade/2.5.0-upgrade-2.5.1-oracle.sql
@@ -171,10 +171,8 @@ insert /*+ 
IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) */
 values ('1518229897214468229', '10', 'flowRuleWarmUpPeriodSec', 
'flowRuleWarmUpPeriodSec', 1, 2, 8, '{"required":"0","defaultValue":"10"}');
 
 /*create plugin resource and permission for admin #3964 */
-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 
('1572525965625266176','1346777449787125760','SHENYU.BUTTON.SYSTEM.RESOURCE','','','','2','6','','1','0','system:plugin:resource','1');
-insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, 
object_id, resource_id)
-VALUES ('1572525965658820608', '1346358560427216896', '1572525965625266176');
+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 ('1572525965625266176', '1346777449787125760', 
'SHENYU.BUTTON.SYSTEM.RESOURCE', '', '', '', 2, 6, '', 1, 0, 
'system:plugin:resource', 1);
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, 
object_id, resource_id) VALUES ('1572525965658820608', '1346358560427216896', 
'1572525965625266176');
 
 
 /* fix issue 3966 */
diff --git a/db/upgrade/2.5.0-upgrade-2.5.1-pg.sql 
b/db/upgrade/2.5.0-upgrade-2.5.1-pg.sql
index 9f8f5f739..39ae31b51 100644
--- a/db/upgrade/2.5.0-upgrade-2.5.1-pg.sql
+++ b/db/upgrade/2.5.0-upgrade-2.5.1-pg.sql
@@ -89,8 +89,8 @@ INSERT INTO "public"."plugin_handle" VALUES 
('1529402613204172803', '10', 'flowR
 INSERT INTO "public"."plugin_handle" VALUES ('1529402613204172804', '10', 
'flowRuleWarmUpPeriodSec', 'flowRuleWarmUpPeriodSec', 1, 2, 6, 
'{"required":"0","defaultValue":"10"}', '2022-06-30 21:00:00', '2022-06-30 
21:00:00');
 
 /*create plugin resource and permission for admin #3964 */
-INSERT INTO "public"."resource" VALUES 
('1572525965625266176','1346777449787125760','SHENYU.BUTTON.SYSTEM.RESOURCE','','','','2','6','','1','0','system:plugin:resource','1');
-INSERT INTO "public"."permission" VALUES ('1572525965658820608', 
'1346358560427216896', '1572525965625266176');
+INSERT INTO "public"."resource" VALUES ('1572525965625266176', 
'1346777449787125760', 'SHENYU.BUTTON.SYSTEM.RESOURCE', '', '', '', 2, 6, '', 
1, 0, 'system:plugin:resource', 1, '2022-09-28 11:50:58', '2022-09-28 
11:50:58');
+INSERT INTO "public"."permission" VALUES ('1572525965658820608', 
'1346358560427216896', '1572525965625266176', '2022-09-28 11:50:58', 
'2022-09-28 11:50:58');
 
 /* fix issue 3966 */
 INSERT INTO "public"."plugin_handle" VALUES ('1529402613204172805', '14', 
'addPrefixed', 'addPrefixed', 3, 2, 3, 
'{"required":"1","defaultValue":"false"}', '2022-09-27 12:00:00', '2022-09-27 
12:00:00');

Reply via email to