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

shenlin pushed a commit to branch runtimer
in repository https://gitbox.apache.org/repos/asf/rocketmq-eventbridge.git

commit b634ba975aa0c77af4c456f7bbe5f3207d29cca3
Author: wangkai <[email protected]>
AuthorDate: Mon Jun 5 11:02:39 2023 +0800

    1.add h2 db migration file directory
---
 .../{migration => h2-migration}/V1__baseline.sql   |   0
 .../{migration => h2-migration}/V2__baseline.sql   |   0
 .../V3__change_target_transform_type.sql           |   0
 .../V4__register_source_acs_mns.sql                |   0
 .../V5__register_target_acs_dingtalk.sql           |   0
 .../V6__register_target_acs_eventbridge.sql        |   0
 ...V7__update_event_connection_table_structure.sql |   0
 .../V8__update_unique_key.sql                      |   0
 .../main/resources/db/migration/V1__baseline.sql   | 256 ++++++++++-----------
 .../main/resources/db/migration/V2__baseline.sql   |  40 ++--
 .../migration/V3__change_target_transform_type.sql |  32 ++-
 .../db/migration/V4__register_source_acs_mns.sql   |  32 ++-
 .../migration/V5__register_target_acs_dingtalk.sql |  30 ++-
 .../V6__register_target_acs_eventbridge.sql        |  32 ++-
 ...V7__update_event_connection_table_structure.sql |  35 ++-
 .../db/migration/V8__update_unique_key.sql         |  40 ++--
 start/src/main/resources/application.properties    |   1 +
 17 files changed, 244 insertions(+), 254 deletions(-)

diff --git 
a/adapter/persistence/src/main/resources/db/migration/V1__baseline.sql 
b/adapter/persistence/src/main/resources/db/h2-migration/V1__baseline.sql
similarity index 100%
copy from adapter/persistence/src/main/resources/db/migration/V1__baseline.sql
copy to adapter/persistence/src/main/resources/db/h2-migration/V1__baseline.sql
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V2__baseline.sql 
b/adapter/persistence/src/main/resources/db/h2-migration/V2__baseline.sql
similarity index 100%
copy from adapter/persistence/src/main/resources/db/migration/V2__baseline.sql
copy to adapter/persistence/src/main/resources/db/h2-migration/V2__baseline.sql
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V3__change_target_transform_type.sql
 
b/adapter/persistence/src/main/resources/db/h2-migration/V3__change_target_transform_type.sql
similarity index 100%
copy from 
adapter/persistence/src/main/resources/db/migration/V3__change_target_transform_type.sql
copy to 
adapter/persistence/src/main/resources/db/h2-migration/V3__change_target_transform_type.sql
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V4__register_source_acs_mns.sql
 
b/adapter/persistence/src/main/resources/db/h2-migration/V4__register_source_acs_mns.sql
similarity index 100%
copy from 
adapter/persistence/src/main/resources/db/migration/V4__register_source_acs_mns.sql
copy to 
adapter/persistence/src/main/resources/db/h2-migration/V4__register_source_acs_mns.sql
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V5__register_target_acs_dingtalk.sql
 
b/adapter/persistence/src/main/resources/db/h2-migration/V5__register_target_acs_dingtalk.sql
similarity index 100%
copy from 
adapter/persistence/src/main/resources/db/migration/V5__register_target_acs_dingtalk.sql
copy to 
adapter/persistence/src/main/resources/db/h2-migration/V5__register_target_acs_dingtalk.sql
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V6__register_target_acs_eventbridge.sql
 
b/adapter/persistence/src/main/resources/db/h2-migration/V6__register_target_acs_eventbridge.sql
similarity index 100%
copy from 
adapter/persistence/src/main/resources/db/migration/V6__register_target_acs_eventbridge.sql
copy to 
adapter/persistence/src/main/resources/db/h2-migration/V6__register_target_acs_eventbridge.sql
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V7__update_event_connection_table_structure.sql
 
b/adapter/persistence/src/main/resources/db/h2-migration/V7__update_event_connection_table_structure.sql
similarity index 100%
copy from 
adapter/persistence/src/main/resources/db/migration/V7__update_event_connection_table_structure.sql
copy to 
adapter/persistence/src/main/resources/db/h2-migration/V7__update_event_connection_table_structure.sql
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V8__update_unique_key.sql 
b/adapter/persistence/src/main/resources/db/h2-migration/V8__update_unique_key.sql
similarity index 100%
copy from 
adapter/persistence/src/main/resources/db/migration/V8__update_unique_key.sql
copy to 
adapter/persistence/src/main/resources/db/h2-migration/V8__update_unique_key.sql
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V1__baseline.sql 
b/adapter/persistence/src/main/resources/db/migration/V1__baseline.sql
index 3909293..e301d56 100644
--- a/adapter/persistence/src/main/resources/db/migration/V1__baseline.sql
+++ b/adapter/persistence/src/main/resources/db/migration/V1__baseline.sql
@@ -1,19 +1,17 @@
-/*
- * 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.
- */
+# 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.
 
 CREATE TABLE IF NOT EXISTS `event_bus` (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
@@ -23,143 +21,145 @@ CREATE TABLE IF NOT EXISTS `event_bus` (
   `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
   `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
   PRIMARY KEY (`id`),
-  UNIQUE KEY `name_uniq_key_event_bus` (`account_id`,`name`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+  UNIQUE KEY `name_uniq_key` (`account_id`,`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8  COMMENT='event bus meta'
+;
 
-CREATE TABLE IF NOT EXISTS `event_topic` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `account_id` varchar(255) DEFAULT 'SYSTEM' COMMENT 'source account id',
-  `bus` varchar(255) NOT NULL COMMENT 'bus name',
-  `name` varchar(255) NOT NULL COMMENT 'topic name',
-  `msg_ttl` int(11) NOT NULL COMMENT 'msg ttl',
-  `cluster` varchar(255) NOT NULL COMMENT 'the cluster of topic',
-  `status` tinyint(4) NOT NULL COMMENT '0:disable, 1:enable',
-  `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
-  `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `name_uniq_key_event_topicdd` (`name`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `event_topic` (
+                               `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+                               `account_id` varchar(255) DEFAULT 'SYSTEM' 
COMMENT 'source account id',
+                               `bus` varchar(255) NOT NULL COMMENT 'bus name',
+                               `name` varchar(255) NOT NULL COMMENT 'topic 
name',
+                               `msg_ttl` int(11) NOT NULL COMMENT 'msg ttl',
+                               `cluster` varchar(255) NOT NULL COMMENT 'the 
cluster of topic',
+                               `status` tinyint(4) NOT NULL COMMENT 
'0:disable, 1:enable',
+                               `gmt_create` datetime DEFAULT NULL COMMENT 
'create time',
+                               `gmt_modify` datetime DEFAULT NULL COMMENT 
'modify time',
+                               PRIMARY KEY (`id`),
+                               UNIQUE KEY `name_uniq_key` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+;
 
 CREATE TABLE IF NOT EXISTS `event_source` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `account_id` varchar(255) DEFAULT 'SYSTEM' COMMENT 'source account id',
-  `bus` varchar(255) NOT NULL COMMENT 'bus name',
-  `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'source name',
-  `status` int(11) NOT NULL DEFAULT '0' COMMENT '0:disable, 1:enable',
-  `type` int(11) NOT NULL DEFAULT '1' COMMENT 'event source type',
-  `class_name` varchar(255) COMMENT 'event source class name',
-  `config` text COMMENT 'event source runner config',
-  `description` varchar(1024) DEFAULT NULL COMMENT 'event source description',
-  `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
-  `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `name_uniq_key_event_source` (`account_id`,`name`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8
+    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+    `account_id` varchar(255) DEFAULT 'SYSTEM' COMMENT 'source account id',
+    `bus` varchar(255) NOT NULL COMMENT 'bus name',
+    `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'source name',
+    `status` int(11) NOT NULL DEFAULT '0' COMMENT '0:disable, 1:enable',
+    `type` int(11) NOT NULL DEFAULT '1' COMMENT 'event source type',
+    `class_name` varchar(255) COMMENT 'event source class name',
+    `config` text COMMENT 'event source runner config',
+    `description` varchar(1024) DEFAULT NULL COMMENT 'event source 
description',
+    `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
+    `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
+    PRIMARY KEY (`id`),
+    UNIQUE KEY `name_uniq_key` (`account_id`,`name`)
+    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='event source meta'
 ;
 
 CREATE TABLE IF NOT EXISTS `event_type` (
-  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
-  `account_id` varchar(255) NOT NULL COMMENT 'bus account id',
-  `bus` varchar(255) NOT NULL COMMENT 'bus name',
-  `source` varchar(255) NOT NULL DEFAULT '' COMMENT 'event source name',
-  `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'event type name',
-  `description` varchar(255) DEFAULT NULL COMMENT 'a description about the 
event type',
-  `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
-  `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `name_uniq_key_event_type` (`source`,`name`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8
+    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+    `account_id` varchar(255) NOT NULL COMMENT 'bus account id',
+    `bus` varchar(255) NOT NULL COMMENT 'bus name',
+    `source` varchar(255) NOT NULL DEFAULT '' COMMENT 'event source name',
+    `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'event type name',
+    `description` varchar(255) DEFAULT NULL COMMENT 'a description about the 
event type',
+    `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
+    `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
+    PRIMARY KEY (`id`),
+    UNIQUE KEY `name_uniq_key` (`source`,`name`)
+    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='event type meta'
 ;
 
 CREATE TABLE IF NOT EXISTS  `event_rule` (
-  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
-  `account_id` varchar(255) NOT NULL COMMENT 'bus account id',
-  `bus` varchar(255) NOT NULL COMMENT 'bus name',
-  `name` varchar(255) NOT NULL COMMENT 'rule name',
-  `filter_pattern` varchar(4096) DEFAULT NULL COMMENT 'event filter pattern',
-  `status` tinyint(4) NOT NULL COMMENT '0:disable, 1:enable',
-  `description` varchar(255) DEFAULT NULL COMMENT 'a description about the 
event rule',
-  `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
-  `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
-  UNIQUE KEY `id` (`id`),
-  UNIQUE KEY `name_uniq_key_event_rule` (`account_id`,`name`,`bus`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8
+    `id` bigint(20) NOT NULL AUTO_INCREMENT,
+    `account_id` varchar(255) NOT NULL COMMENT 'bus account id',
+    `bus` varchar(255) NOT NULL COMMENT 'bus name',
+    `name` varchar(255) NOT NULL COMMENT 'rule name',
+    `filter_pattern` varchar(4096) DEFAULT NULL COMMENT 'event filter pattern',
+    `status` tinyint(4) NOT NULL COMMENT '0:disable, 1:enable',
+    `description` varchar(255) DEFAULT NULL COMMENT 'a description about the 
event rule',
+    `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
+    `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
+    UNIQUE KEY `id` (`id`),
+    UNIQUE KEY `name_uniq_key` (`account_id`,`name`,`bus`)
+    ) ENGINE=InnoDB AUTO_INCREMENT=51815 DEFAULT CHARSET=utf8 COMMENT='event 
rule meta'
 ;
 
 CREATE TABLE IF NOT EXISTS `event_source_runner` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `account_id` varchar(255) DEFAULT 'SYSTEM' COMMENT 'source account id',
-  `bus` varchar(255) NOT NULL COMMENT 'bus name',
-  `source` varchar(255) NOT NULL DEFAULT '' COMMENT 'source name',
-  `run_options` varchar(1024) DEFAULT NULL COMMENT 'event source runner 
options',
-  `run_context` varchar(1024) DEFAULT NULL COMMENT 'event source running 
context',
-  `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
-  `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `name_uniq_key_event_source_runner` (`account_id`,`bus`,`source`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8
+    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+    `account_id` varchar(255) DEFAULT 'SYSTEM' COMMENT 'source account id',
+    `bus` varchar(255) NOT NULL COMMENT 'bus name',
+    `source` varchar(255) NOT NULL DEFAULT '' COMMENT 'source name',
+    `run_options` varchar(1024) DEFAULT NULL COMMENT 'event source runner 
options',
+    `run_context` varchar(1024) DEFAULT NULL COMMENT 'event source running 
context',
+    `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
+    `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
+    PRIMARY KEY (`id`),
+    UNIQUE KEY `name_uniq_key` (`account_id`,`bus`,`source`)
+    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='event source runner meta'
 ;
 
 CREATE TABLE IF NOT EXISTS `event_target` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `account_id` varchar(255) DEFAULT 'SYSTEM' COMMENT 'target account id',
-  `bus` varchar(255) NOT NULL COMMENT 'bus name',
-  `rule` varchar(255) NOT NULL DEFAULT '' COMMENT 'rule name',
-  `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'target name',
-  `class_name` varchar(255) NOT NULL COMMENT 'event target class name',
-  `config` text NOT NULL COMMENT 'event target runner config',
-  `run_options` varchar(1024) DEFAULT NULL COMMENT 'event target runner 
options',
-  `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
-  `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `name_uniq_key_event_target` (`account_id`,`bus`,`rule`,`name`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8
+    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+    `account_id` varchar(255) DEFAULT 'SYSTEM' COMMENT 'target account id',
+    `bus` varchar(255) NOT NULL COMMENT 'bus name',
+    `rule` varchar(255) NOT NULL DEFAULT '' COMMENT 'rule name',
+    `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'target name',
+    `class_name` varchar(255) NOT NULL COMMENT 'event target class name',
+    `config` text NOT NULL COMMENT 'event target runner config',
+    `run_options` varchar(1024) DEFAULT NULL COMMENT 'event target runner 
options',
+    `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
+    `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
+    PRIMARY KEY (`id`),
+    UNIQUE KEY `name_uniq_key` (`account_id`,`bus`,`rule`,`name`)
+    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='event target meta'
 ;
 
 
 
 CREATE TABLE IF NOT EXISTS `event_target_runner` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `account_id` varchar(255) DEFAULT 'SYSTEM' COMMENT 'target account id',
-  `bus` varchar(255) NOT NULL COMMENT 'bus name',
-  `rule` varchar(255) NOT NULL DEFAULT '' COMMENT 'rule name',
-  `target` varchar(255) NOT NULL DEFAULT '' COMMENT 'target name',
-  `run_context` varchar(1024) DEFAULT NULL COMMENT 'event target running 
context',
-  `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
-  `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `name_uniq_key_event_target_runner` 
(`account_id`,`bus`,`rule`,`target`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8
+    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+    `account_id` varchar(255) DEFAULT 'SYSTEM' COMMENT 'target account id',
+    `bus` varchar(255) NOT NULL COMMENT 'bus name',
+    `rule` varchar(255) NOT NULL DEFAULT '' COMMENT 'rule name',
+    `target` varchar(255) NOT NULL DEFAULT '' COMMENT 'target name',
+    `run_context` varchar(1024) DEFAULT NULL COMMENT 'event target running 
context',
+    `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
+    `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
+    PRIMARY KEY (`id`),
+    UNIQUE KEY `name_uniq_key` (`account_id`,`bus`,`rule`,`target`)
+    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='event target runner meta'
 ;
 
 
 CREATE TABLE IF NOT EXISTS `event_source_class` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'source class name',
-  `api_params` text NOT NULL COMMENT 'event source api params',
-  `required_params` text NOT NULL COMMENT 'event source required params',
-  `transform` text NOT NULL COMMENT 'transform the event source data',
-  `visual_config` text DEFAULT NULL COMMENT 'event source fore-end visual 
config',
-  `description` varchar(255) DEFAULT NULL COMMENT 'a description about the 
source class',
-  `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
-  `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `name_uniq_key_event_source_class` (`name`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8
+    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+    `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'source class name',
+    `api_params` text NOT NULL COMMENT 'event source api params',
+    `required_params` text NOT NULL COMMENT 'event source required params',
+    `transform` text NOT NULL COMMENT 'transform the event source data',
+    `visual_config` text DEFAULT NULL COMMENT 'event source fore-end visual 
config',
+    `description` varchar(255) DEFAULT NULL COMMENT 'a description about the 
source class',
+    `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
+    `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
+    PRIMARY KEY (`id`),
+    UNIQUE KEY `name_uniq_key` (`name`)
+    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='event source class meta'
 ;
 
 
 CREATE TABLE IF NOT EXISTS `event_target_class` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'target class name',
-  `api_params` text NOT NULL COMMENT 'event target api params',
-  `target_transform` text NOT NULL COMMENT 'event target required data',
-  `required_params` text NOT NULL COMMENT 'event target required params',
-  `visual_config` text DEFAULT NULL COMMENT 'event target fore-end visual 
config',
-  `description` varchar(255) DEFAULT NULL COMMENT 'a description about the 
target class',
-  `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
-  `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `name_uniq_key_event_target_class` (`name`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8
-;
+    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+    `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'target class name',
+    `api_params` text NOT NULL COMMENT 'event target api params',
+    `target_transform` text NOT NULL COMMENT 'event target required data',
+    `required_params` text NOT NULL COMMENT 'event target required params',
+    `visual_config` text DEFAULT NULL COMMENT 'event target fore-end visual 
config',
+    `description` varchar(255) DEFAULT NULL COMMENT 'a description about the 
target class',
+    `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
+    `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
+    PRIMARY KEY (`id`),
+    UNIQUE KEY `name_uniq_key` (`name`)
+    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='event target class meta'
+;
\ No newline at end of file
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V2__baseline.sql 
b/adapter/persistence/src/main/resources/db/migration/V2__baseline.sql
index c70912c..a8a8c62 100644
--- a/adapter/persistence/src/main/resources/db/migration/V2__baseline.sql
+++ b/adapter/persistence/src/main/resources/db/migration/V2__baseline.sql
@@ -1,19 +1,17 @@
-/*
- * 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.
- */
+# 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.
 
 CREATE TABLE IF NOT EXISTS `event_connection` (
     `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
@@ -27,8 +25,8 @@ CREATE TABLE IF NOT EXISTS `event_connection` (
     `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
     `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
     PRIMARY KEY (`id`),
-    UNIQUE KEY `name_uniq_key_event_connection` (`name`)
-    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8
+    UNIQUE KEY `name_uniq_key` (`name`)
+    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='event connection meta'
 ;
 
 
@@ -44,6 +42,6 @@ CREATE TABLE IF NOT EXISTS `event_api_destination` (
     `gmt_create` datetime DEFAULT NULL COMMENT 'create time',
     `gmt_modify` datetime DEFAULT NULL COMMENT 'modify time',
     PRIMARY KEY (`id`),
-    UNIQUE KEY `name_uniq_key_event_api_destination` (`name`)
-    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8
-;
+    UNIQUE KEY `name_uniq_key` (`name`)
+    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='event api destination meta'
+;
\ No newline at end of file
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V3__change_target_transform_type.sql
 
b/adapter/persistence/src/main/resources/db/migration/V3__change_target_transform_type.sql
index b2a18c2..6c872c9 100644
--- 
a/adapter/persistence/src/main/resources/db/migration/V3__change_target_transform_type.sql
+++ 
b/adapter/persistence/src/main/resources/db/migration/V3__change_target_transform_type.sql
@@ -1,19 +1,17 @@
-/*
- * 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.
- */
+# 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.
 
 ALTER TABLE `event_target_class`
-CHANGE COLUMN `target_transform` `target_transform` TEXT NULL DEFAULT NULL ;
+CHANGE COLUMN `target_transform` `target_transform` TEXT NULL DEFAULT NULL ;
\ No newline at end of file
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V4__register_source_acs_mns.sql
 
b/adapter/persistence/src/main/resources/db/migration/V4__register_source_acs_mns.sql
index 1ad499a..7bc4cfc 100644
--- 
a/adapter/persistence/src/main/resources/db/migration/V4__register_source_acs_mns.sql
+++ 
b/adapter/persistence/src/main/resources/db/migration/V4__register_source_acs_mns.sql
@@ -1,18 +1,16 @@
-/*
- * 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.
- */
+# 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.
 
-INSERT INTO `event_source_class` 
(`name`,`api_params`,`required_params`,`transform`,`visual_config`,`description`,`gmt_create`,`gmt_modify`)
 VALUES ('acs.mns','{\n    \"RegionId\":{\n        \"type\":\"String\",\n       
 \"desc\":\"the region of aliyun mns.\",\n        \"required\":true,\n        
\"defaultValue\":\"\"\n    },\n    \"QueueName\":{\n        
\"type\":\"String\",\n        \"desc\":\"the queue name of aliyun mns.\",\n     
   \"required\":true,\n        \"defaultValue\":\"\"\n [...]
+INSERT INTO `event_source_class` 
(`name`,`api_params`,`required_params`,`transform`,`visual_config`,`description`,`gmt_create`,`gmt_modify`)
 VALUES ('acs.mns','{\n    \"RegionId\":{\n        \"type\":\"String\",\n       
 \"desc\":\"the region of aliyun mns.\",\n        \"required\":true,\n        
\"defaultValue\":\"\"\n    },\n    \"QueueName\":{\n        
\"type\":\"String\",\n        \"desc\":\"the queue name of aliyun mns.\",\n     
   \"required\":true,\n        \"defaultValue\":\"\"\n [...]
\ No newline at end of file
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V5__register_target_acs_dingtalk.sql
 
b/adapter/persistence/src/main/resources/db/migration/V5__register_target_acs_dingtalk.sql
index 1d8a643..31291a1 100644
--- 
a/adapter/persistence/src/main/resources/db/migration/V5__register_target_acs_dingtalk.sql
+++ 
b/adapter/persistence/src/main/resources/db/migration/V5__register_target_acs_dingtalk.sql
@@ -1,19 +1,17 @@
-/*
- * 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.
- */
+# 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.
 
 INSERT INTO `event_target_class` 
(`name`,`api_params`,`target_transform`,`required_params`,`visual_config`,`description`,`gmt_create`,`gmt_modify`)
 VALUES
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V6__register_target_acs_eventbridge.sql
 
b/adapter/persistence/src/main/resources/db/migration/V6__register_target_acs_eventbridge.sql
index b7587a0..9a38fe6 100644
--- 
a/adapter/persistence/src/main/resources/db/migration/V6__register_target_acs_eventbridge.sql
+++ 
b/adapter/persistence/src/main/resources/db/migration/V6__register_target_acs_eventbridge.sql
@@ -1,20 +1,18 @@
-/*
- * 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.
- */
+# 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.
 
 INSERT INTO `event_target_class` 
(`name`,`api_params`,`target_transform`,`required_params`,`visual_config`,`description`,`gmt_create`,`gmt_modify`)
 VALUES
-('acs.eventbridge','{\n    \"RegionId\":{\n        \"type\":\"String\",\n      
  \"desc\":\"the region of aliyun eventbridge.\",\n        \"required\":true\n  
  },\n    \"AliyunAccountId\":{\n        \"type\":\"String\",\n        
\"desc\":\"the account id of aliyun eventbridge.\",\n        
\"required\":true\n    },\n    \"AliyunEventBus\":{\n        
\"type\":\"String\",\n        \"desc\":\"the bus of aliyun eventbridge.\",\n    
    \"required\":true\n    },\n    \"AccessKeyId\":{\n       [...]
+('acs.eventbridge','{\n    \"RegionId\":{\n        \"type\":\"String\",\n      
  \"desc\":\"the region of aliyun eventbridge.\",\n        \"required\":true\n  
  },\n    \"AliyunAccountId\":{\n        \"type\":\"String\",\n        
\"desc\":\"the account id of aliyun eventbridge.\",\n        
\"required\":true\n    },\n    \"AliyunEventBus\":{\n        
\"type\":\"String\",\n        \"desc\":\"the bus of aliyun eventbridge.\",\n    
    \"required\":true\n    },\n    \"AccessKeyId\":{\n       [...]
\ No newline at end of file
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V7__update_event_connection_table_structure.sql
 
b/adapter/persistence/src/main/resources/db/migration/V7__update_event_connection_table_structure.sql
index e98bbf0..82be349 100644
--- 
a/adapter/persistence/src/main/resources/db/migration/V7__update_event_connection_table_structure.sql
+++ 
b/adapter/persistence/src/main/resources/db/migration/V7__update_event_connection_table_structure.sql
@@ -1,19 +1,18 @@
-/*
- * 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.
- */
+# 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.
 
---ALTER TABLE `event_connection` MODIFY COLUMN `authorization_type` 
varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT 
'授权类型' AFTER `name`;
---ALTER TABLE `event_connection` MODIFY COLUMN `auth_parameters` text 
CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `authorization_type`;
\ No newline at end of file
+ALTER TABLE `event_connection`
+MODIFY COLUMN `authorization_type` varchar(128) CHARACTER SET utf8 COLLATE 
utf8_general_ci NULL DEFAULT '' COMMENT '授权类型' AFTER `name`,
+MODIFY COLUMN `auth_parameters` text CHARACTER SET utf8 COLLATE 
utf8_general_ci NULL AFTER `authorization_type`;
\ No newline at end of file
diff --git 
a/adapter/persistence/src/main/resources/db/migration/V8__update_unique_key.sql 
b/adapter/persistence/src/main/resources/db/migration/V8__update_unique_key.sql
index 2e9098e..f25bfb0 100644
--- 
a/adapter/persistence/src/main/resources/db/migration/V8__update_unique_key.sql
+++ 
b/adapter/persistence/src/main/resources/db/migration/V8__update_unique_key.sql
@@ -1,22 +1,22 @@
-/*
- * 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.
- */
+# 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.
 
-ALTER TABLE `event_connection` DROP INDEX `name_uniq_key_event_connection`;
-ALTER TABLE `event_connection` ADD UNIQUE INDEX 
`name_uniq_key_event_connection`(`name`, `account_id`) USING BTREE;
+ALTER TABLE `event_connection`
+DROP INDEX `name_uniq_key`,
+ADD UNIQUE INDEX `name_uniq_key`(`name`, `account_id`) USING BTREE;
 
-ALTER TABLE `event_api_destination` DROP INDEX 
`name_uniq_key_event_api_destination`;
-ALTER TABLE `event_api_destination` ADD UNIQUE INDEX 
`name_uniq_key_event_api_destination`(`name`, `account_id`) USING BTREE;
\ No newline at end of file
+ALTER TABLE `event_api_destination`
+DROP INDEX `name_uniq_key`,
+ADD UNIQUE INDEX `name_uniq_key`(`name`, `account_id`) USING BTREE;
\ No newline at end of file
diff --git a/start/src/main/resources/application.properties 
b/start/src/main/resources/application.properties
index 3736814..62daed6 100644
--- a/start/src/main/resources/application.properties
+++ b/start/src/main/resources/application.properties
@@ -25,6 +25,7 @@ spring.profiles.active=local
 mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
 ## flyway
 spring.flyway.placeholderReplacement=false
+spring.flyway.locations=classpath:db/h2-migration
 ## rocketmq
 rocketmq.namesrvAddr=localhost:9876
 rocketmq.connect.endpoint=http://127.0.0.1:8082


Reply via email to