You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by sh...@apache.org on 2022/12/09 06:04:58 UTC

[rocketmq-eventbridge] branch main updated: fix unique index (#42)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new fa480ff  fix unique index (#42)
fa480ff is described below

commit fa480ff2cdaeebc3f38ef5a95a6e22344c8d7a9b
Author: zhaohai <33...@users.noreply.github.com>
AuthorDate: Fri Dec 9 14:04:53 2022 +0800

    fix unique index (#42)
    
    Co-authored-by: zh378814 <wb...@alibaba-inc.com>
---
 .../db/migration/V8__update_unique_key.sql         | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

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
new file mode 100644
index 0000000..f25bfb0
--- /dev/null
+++ b/adapter/persistence/src/main/resources/db/migration/V8__update_unique_key.sql
@@ -0,0 +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.
+
+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`,
+ADD UNIQUE INDEX `name_uniq_key`(`name`, `account_id`) USING BTREE;
\ No newline at end of file