补充自增字段参数配置

This commit is contained in:
inrgihc
2020-08-31 14:59:39 +08:00
parent c1c89bb545
commit a0e4f23c6b
4 changed files with 10 additions and 4 deletions

View File

@@ -103,7 +103,10 @@ public class PropertiesConfig {
@Value("${target.datasource-target.drop}")
public Boolean dropTargetTable;
@Value("${target.create-table.auto-increment}")
public Boolean createSupportAutoIncr;
@Value("${target.writer-engine.insert}")
public Boolean engineInsert;

View File

@@ -163,7 +163,7 @@ public class MainService {
properties.dbSourceUserName, properties.dbSourcePassword, tableDescription.getSchemaName(),
tableDescription.getTableName());
String sqlCreateTable = metaDataService.getDDLCreateTableSQL(targetDatabaseType, columnDescs, primaryKeys,
properties.dbTargetSchema, tableDescription.getTableName(), false);
properties.dbTargetSchema, tableDescription.getTableName(), properties.createSupportAutoIncr);
targetJdbcTemplate.execute(sqlCreateTable);
log.info("Execute SQL: \n{}", sqlCreateTable);

View File

@@ -27,8 +27,10 @@ source.datasource-source.excludes=
target.datasource-target.schema=public
## whether drop-create table when target table exist
target.datasource-target.drop=true
## whether create table support auto increment for primary key field
target.create-table.auto-increment=false
## whether use insert engine to write data for target database
## Only usefull for PostgreSQL/Greenplum database
target.writer-engine.insert=false
## whether use change data synchronize to target database table
target.change-data-synch=false
target.change-data-synch=true