version for v1.6.13

This commit is contained in:
inrgihc
2022-07-16 23:26:26 +08:00
parent ea64d07503
commit b5c3f3f958
26 changed files with 105 additions and 32 deletions

View File

@@ -24,23 +24,23 @@
### 3、详细功能
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/HighGo/Hive/SQLite向目的端为Greenplum/PostgreSQL/HighGo的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为Greenplum/PostgreSQL/HighGo的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/HighGo/Hive/SQLite向目的端为Oracle的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为Oracle的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/HighGo/Hive/SQLite向目的端为SQLServer的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为SQLServer的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/HighGo/Hive/SQLite向目的端为MySQL/MariaDB的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为MySQL/MariaDB/GBase8a的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/HighGo/Hive/SQLite向目的端为DB2的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为DB2的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/HighGo/Hive/SQLite向目的端为Kingbase8的迁移(**支持绝大多数常规类型字段...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为Kingbase8的迁移(**支持绝大多数常规类型字段...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/HighGo/Hive/SQLite向目的端为DM的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为DM的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/HighGo/Hive/SQLite向目的端为OSCAR的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为OSCAR的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/HighGo/Hive/SQLite向目的端为SQLite的迁移(**支持部分常规类型字段...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为SQLite的迁移(**支持部分常规类型字段...**)
** 注:** 目前Hive只支持Hive version 3.x的账号密码方式认证。
@@ -212,7 +212,7 @@ dbswitch:
> 提示:如果要将源端所有表名(或者字段名)添加前缀,可以配置```"from-pattern": "^","to-value": "T_"```;
- 6各个数据库的JDBC驱动连接示例如下
- 6支持的数据库产品及其JDBC驱动连接示例如下
**MySQL/MariaDB数据库**
@@ -277,6 +277,13 @@ jdbc连接地址jdbc:oscar://172.17.2.1:2003/OSRDB
jdbc驱动名称com.oscar.Driver
```
**南大通用GBase8a数据库**
```
jdbc连接地址jdbc:gbase://172.17.2.1:5258/gbase
jdbc驱动名称com.gbase.jdbc.Driver
```
**翰高HighGo数据库(可按PostgreSQL使用)**
```

View File

@@ -2,7 +2,7 @@
set -e
DBSWITCH_VERSION=1.6.12
DBSWITCH_VERSION=1.6.13
BUILD_DOCKER_DIR="$( cd "$( dirname "$0" )" && pwd )"
PROJECT_ROOT_DIR=$( dirname "$BUILD_DOCKER_DIR")
DOCKER_DBSWITCH_DIR=$BUILD_DOCKER_DIR/dbswitch

View File

@@ -13,7 +13,7 @@ services:
MYSQL_ROOT_HOST: '%'
dbswitch:
container_name: dbswitch_webui
image: inrgihc/dbswitch:1.6.12
image: inrgihc/dbswitch:1.6.13
environment:
MYSQLDB_HOST: dbswitch_mysqldb
MYSQLDB_PORT: 3306

View File

@@ -4,6 +4,10 @@
基于Vue.js 2.0编写的dbswitch操作管理web端。
## 二、环境
**node** : >= v14.17.3
## 二、构建
``` bash

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>dbswitch-admin</artifactId>

View File

@@ -55,13 +55,16 @@ public enum SupportDbTypeEnum {
"SELECT 1",
"jdbc:oscar://",
new String[]{"jdbc:oscar://{host}[:{port}]/[{database}][\\?{params}]"}),
HIVE(10, "hive", "org.apache.hive.jdbc.HiveDriver", 10000,
GBASE8A(10, "gbase8a", "com.gbase.jdbc.Driver", 5258,
"/* ping */ SELECT 1",
"jdbc:gbase://",
new String[]{"jdbc:gbase://{host}[:{port}]/[{database}][\\?{params}]"}),
HIVE(11, "hive", "org.apache.hive.jdbc.HiveDriver", 10000,
"SELECT 1",
"jdbc:hive2://",
new String[]{"jdbc:hive2://{host}[:{port}]/[{database}][\\?{params}]"}),
// 参考文章https://blog.csdn.net/wank1259162/article/details/104946744
SQLITE3(11, "sqlite3", "org.sqlite.JDBC", 0,
SQLITE3(12, "sqlite3", "org.sqlite.JDBC", 0,
"SELECT 1",
"jdbc:sqlite:",
new String[]{"jdbc:sqlite:{file}", "jdbc:sqlite::resource:{file}"}),

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>dbswitch-common</artifactId>

View File

@@ -77,15 +77,20 @@ public enum DatabaseTypeEnum {
*/
OSCAR(11),
/**
* [国产]南大通用GBase8a数据库
*/
GBASE8A(12),
/**
* HIVE数据库
*/
HIVE(12),
HIVE(13),
/**
* SQLite数据库
*/
SQLITE3(13),
SQLITE3(14),
;
private int index;
@@ -94,9 +99,15 @@ public enum DatabaseTypeEnum {
this.index = idx;
}
public int getIndex() {
return index;
}
public boolean noCommentStatement() {
return Arrays.asList(
DatabaseTypeEnum.MYSQL,
DatabaseTypeEnum.MARIADB,
DatabaseTypeEnum.GBASE8A,
DatabaseTypeEnum.HIVE,
DatabaseTypeEnum.SQLITE3
).contains(this);

View File

@@ -46,6 +46,7 @@ public final class DatabaseAwareUtils {
productNameMap.put("Hive", DatabaseTypeEnum.HIVE);
productNameMap.put("SQLite", DatabaseTypeEnum.SQLITE3);
productNameMap.put("OSCAR", DatabaseTypeEnum.OSCAR);
productNameMap.put("GBase", DatabaseTypeEnum.GBASE8A);
driverNameMap.put("MySQL Connector Java", DatabaseTypeEnum.MYSQL);
driverNameMap.put("MariaDB Connector/J", DatabaseTypeEnum.MARIADB);
@@ -57,6 +58,7 @@ public final class DatabaseAwareUtils {
driverNameMap.put("Hive JDBC", DatabaseTypeEnum.HIVE);
driverNameMap.put("SQLite JDBC", DatabaseTypeEnum.SQLITE3);
driverNameMap.put("OSCAR JDBC DRIVER", DatabaseTypeEnum.OSCAR);
driverNameMap.put("GBase JDBC Driver", DatabaseTypeEnum.GBASE8A);
}
/**

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>dbswitch-core</artifactId>
@@ -102,6 +102,15 @@
<systemPath>${project.basedir}/lib/oscarJDBC8.jar</systemPath>
</dependency>
<!-- http://www.gbase8.cn/wp-content/uploads/2020/07/gbase-connector-java-8.3.81.53-build55.5.3.zip -->
<dependency>
<groupId>com.gbase.jdbc</groupId>
<artifactId>gbase-connector-java</artifactId>
<version>8.3.81.53</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/gbase-connector-java-8.3.81.53-build55.5.3-bin.jar</systemPath>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>

View File

@@ -12,6 +12,7 @@ package com.gitee.dbswitch.core.database;
import com.gitee.dbswitch.common.type.DatabaseTypeEnum;
import com.gitee.dbswitch.core.database.impl.DatabaseDB2Impl;
import com.gitee.dbswitch.core.database.impl.DatabaseDmImpl;
import com.gitee.dbswitch.core.database.impl.DatabaseGbase8aImpl;
import com.gitee.dbswitch.core.database.impl.DatabaseGreenplumImpl;
import com.gitee.dbswitch.core.database.impl.DatabaseHiveImpl;
import com.gitee.dbswitch.core.database.impl.DatabaseKingbaseImpl;
@@ -41,16 +42,17 @@ public final class DatabaseFactory {
{
put(DatabaseTypeEnum.MYSQL, DatabaseMysqlImpl::new);
put(DatabaseTypeEnum.MARIADB, DatabaseMariaDBImpl::new);
put(DatabaseTypeEnum.ORACLE, DatabaseOracleImpl::new);
put(DatabaseTypeEnum.SQLSERVER2000, DatabaseSqlserver2000Impl::new);
put(DatabaseTypeEnum.SQLSERVER, DatabaseSqlserverImpl::new);
put(DatabaseTypeEnum.POSTGRESQL, DatabasePostgresImpl::new);
put(DatabaseTypeEnum.GREENPLUM, DatabaseGreenplumImpl::new);
put(DatabaseTypeEnum.MARIADB, DatabaseMariaDBImpl::new);
put(DatabaseTypeEnum.DB2, DatabaseDB2Impl::new);
put(DatabaseTypeEnum.DM, DatabaseDmImpl::new);
put(DatabaseTypeEnum.KINGBASE, DatabaseKingbaseImpl::new);
put(DatabaseTypeEnum.OSCAR, DatabaseOscarImpl::new);
put(DatabaseTypeEnum.GBASE8A, DatabaseGbase8aImpl::new);
put(DatabaseTypeEnum.HIVE, DatabaseHiveImpl::new);
put(DatabaseTypeEnum.SQLITE3, DatabaseSqliteImpl::new);
}

View File

@@ -0,0 +1,30 @@
// Copyright tang. All rights reserved.
// https://gitee.com/inrgihc/dbswitch
//
// Use of this source code is governed by a BSD-style license
//
// Author: tang (inrgihc@126.com)
// Date : 2020/1/2
// Location: beijing , china
/////////////////////////////////////////////////////////////
package com.gitee.dbswitch.core.database.impl;
import com.gitee.dbswitch.common.type.DatabaseTypeEnum;
/**
* 支持GBase8a数据库的元信息实现
*
* @author tang
*/
public class DatabaseGbase8aImpl extends DatabaseMysqlImpl {
public DatabaseGbase8aImpl() {
super("com.gbase.jdbc.Driver");
}
@Override
public DatabaseTypeEnum getDatabaseType() {
return DatabaseTypeEnum.GBASE8A;
}
}

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>dbswitch-data</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>dbswitch-dbchange</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>dbswitch-dbcommon</artifactId>

View File

@@ -41,7 +41,7 @@ public final class DatabaseOperatorFactory {
{
put(DatabaseTypeEnum.MYSQL, MysqlDatabaseOperator::new);
put(DatabaseTypeEnum.MYSQL, MysqlDatabaseOperator::new);
put(DatabaseTypeEnum.MARIADB, MysqlDatabaseOperator::new);
put(DatabaseTypeEnum.ORACLE, OracleDatabaseOperator::new);
put(DatabaseTypeEnum.SQLSERVER, SqlServerDatabaseOperator::new);
put(DatabaseTypeEnum.SQLSERVER2000, SqlServerDatabaseOperator::new);
@@ -51,6 +51,7 @@ public final class DatabaseOperatorFactory {
put(DatabaseTypeEnum.DM, DmDatabaseOperator::new);
put(DatabaseTypeEnum.KINGBASE, KingbaseDatabaseOperator::new);
put(DatabaseTypeEnum.OSCAR, OscarDatabaseOperator::new);
put(DatabaseTypeEnum.GBASE8A, MysqlDatabaseOperator::new);
put(DatabaseTypeEnum.HIVE, HiveDatabaseOperator::new);
put(DatabaseTypeEnum.SQLITE3, SqliteDatabaseOperator::new);
}

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>dbswitch-dbsynch</artifactId>

View File

@@ -40,6 +40,7 @@ public final class DatabaseSynchronizeFactory {
{
put(DatabaseTypeEnum.MYSQL, MySqlDatabaseSyncImpl::new);
put(DatabaseTypeEnum.MARIADB, MySqlDatabaseSyncImpl::new);
put(DatabaseTypeEnum.ORACLE, OracleDatabaseSyncImpl::new);
put(DatabaseTypeEnum.SQLSERVER, SqlServerDatabaseSyncImpl::new);
put(DatabaseTypeEnum.SQLSERVER2000, SqlServerDatabaseSyncImpl::new);
@@ -49,6 +50,7 @@ public final class DatabaseSynchronizeFactory {
put(DatabaseTypeEnum.DM, DmDatabaseSyncImpl::new);
put(DatabaseTypeEnum.KINGBASE, KingbaseDatabaseSyncImpl::new);
put(DatabaseTypeEnum.OSCAR, OscarDatabaseSyncImpl::new);
put(DatabaseTypeEnum.GBASE8A, MySqlDatabaseSyncImpl::new);
put(DatabaseTypeEnum.SQLITE3, Sqlite3DatabaseSyncImpl::new);
}
};

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>dbswitch-dbwriter</artifactId>

View File

@@ -39,6 +39,7 @@ public class DatabaseWriterFactory {
{
put(DatabaseTypeEnum.MYSQL, MySqlWriterImpl::new);
put(DatabaseTypeEnum.MARIADB, MySqlWriterImpl::new);
put(DatabaseTypeEnum.ORACLE, OracleWriterImpl::new);
put(DatabaseTypeEnum.SQLSERVER, SqlServerWriterImpl::new);
put(DatabaseTypeEnum.SQLSERVER2000, SqlServerWriterImpl::new);
@@ -49,6 +50,7 @@ public class DatabaseWriterFactory {
//对于kingbase当前只能使用insert模式
put(DatabaseTypeEnum.KINGBASE, KingbaseInsertWriterImpl::new);
put(DatabaseTypeEnum.OSCAR, OscarWriterImpl::new);
put(DatabaseTypeEnum.GBASE8A, MySqlWriterImpl::new);
put(DatabaseTypeEnum.SQLITE3, Sqlite3WriterImpl::new);
}
};

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>dbswitch-pgwriter</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>dbswitch-sql</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
</parent>
<artifactId>package-tool</artifactId>

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.12</version>
<version>1.6.13</version>
<packaging>pom</packaging>
<name>dbswitch</name>
<description>database switch project</description>

View File

@@ -1,6 +1,6 @@
@echo off
set APP_VERSION=1.6.12
set APP_VERSION=1.6.13
echo "Clean Project ..."
call mvn clean -f pom.xml