This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 0170a81ebf1 Improve H2JDBCRepositoryProvider.createTableSQL (#20637)
0170a81ebf1 is described below
commit 0170a81ebf1211a2003f7391307ea56e81e7f5d1
Author: Xinze Guo <[email protected]>
AuthorDate: Mon Aug 29 19:19:13 2022 +0800
Improve H2JDBCRepositoryProvider.createTableSQL (#20637)
---
.../mode/repository/standalone/h2/H2JDBCRepositoryProvider.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-jdbc/shardingsphere-standalone-mode-repository-jdbc-h2/src/main/java/org/apache/shardingsphere/mode/repository/standalone/h2/H2JDBCRepositoryProvider.java
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repos
[...]
index b8c2403f6a0..6c022c2dbdd 100644
---
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-jdbc/shardingsphere-standalone-mode-repository-jdbc-h2/src/main/java/org/apache/shardingsphere/mode/repository/standalone/h2/H2JDBCRepositoryProvider.java
+++
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-jdbc/shardingsphere-standalone-mode-repository-jdbc-h2/src/main/java/org/apache/shardingsphere/mode/repository/standalone/h2/H2JDBCRepositoryProvider.java
@@ -31,7 +31,7 @@ public final class H2JDBCRepositoryProvider implements
JDBCRepositoryProvider {
@Override
public String createTableSQL() {
- return "CREATE TABLE `repository`(id varchar(36) PRIMARY KEY, `key`
TEXT, `value` TEXT, parent TEXT)";
+ return "CREATE TABLE IF NOT EXISTS `repository`(id varchar(36) PRIMARY
KEY, `key` TEXT, `value` TEXT, parent TEXT)";
}
@Override