Skip to content

Commit

Permalink
0002807: DBCompare should process tables that have a PK mapped in a
Browse files Browse the repository at this point in the history
transform, even if they don't have a physical PK
  • Loading branch information
mmichalek committed Sep 19, 2016
1 parent 161b8f7 commit c77cfb4
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -319,10 +319,6 @@ protected List<DbCompareTables> loadTables(List<String> tableNames) {
log.warn("No source table found for table name {}", tableName);
continue;
}
if (sourceTable.getPrimaryKeyColumnCount() == 0) {
log.warn("Source table {} doesn't have any primary key columns and will not be considered in the comparison.", sourceTable);
continue;
}

DbCompareTables tables = new DbCompareTables(sourceTable, null);

Expand All @@ -333,6 +329,11 @@ protected List<DbCompareTables> loadTables(List<String> tableNames) {
}

tables.applyColumnMappings();

if (tables.getSourceTable().getPrimaryKeyColumnCount() == 0) {
log.warn("Source table {} doesn't have any primary key columns and will not be considered in the comparison.", sourceTable);
continue;
}

boolean success = mapPrimaryKey(tables);
if (success) {
Expand Down

0 comments on commit c77cfb4

Please sign in to comment.