Skip to content

Commit

Permalink
Merge branch '3.9' of https://github.com/JumpMind/symmetric-ds.git in…
Browse files Browse the repository at this point in the history
…to 3.9
  • Loading branch information
jumpmind-josh committed Oct 24, 2018
2 parents 1e69027 + f590c70 commit 4e5a37e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Expand Up @@ -186,6 +186,7 @@ protected static List<String> populateAllTables(String tablePrefix) {
tables.add(getTableName(tablePrefix, TableConstants.SYM_FILE_SNAPSHOT));
tables.add(getTableName(tablePrefix, TableConstants.SYM_FILE_INCOMING));
tables.add(getTableName(tablePrefix, SYM_CONSOLE_USER));
tables.add(getTableName(tablePrefix, SYM_CONSOLE_USER_HIST));
tables.add(getTableName(tablePrefix, SYM_CONSOLE_EVENT));
tables.add(getTableName(tablePrefix, SYM_EXTENSION));
tables.add(getTableName(tablePrefix, SYM_MONITOR));
Expand Down
Expand Up @@ -45,6 +45,7 @@
import org.jumpmind.symmetric.common.TableConstants;
import org.jumpmind.symmetric.io.DbCompareReport.TableReport;
import org.jumpmind.symmetric.model.Trigger;
import org.jumpmind.symmetric.model.TriggerHistory;
import org.jumpmind.symmetric.model.TriggerRouter;
import org.jumpmind.symmetric.service.impl.TransformService.TransformTableNodeGroupLink;
import org.slf4j.Logger;
Expand Down Expand Up @@ -309,7 +310,7 @@ protected List<DbCompareTables> getTablesToCompare() {

protected List<DbCompareTables> loadTablesFromConfig() {
List<Trigger> triggers = sourceEngine.getTriggerRouterService().getTriggersForCurrentNode(true);
List<String> configTables = TableConstants.getConfigTables(sourceEngine.getTablePrefix());
List<String> configTables = TableConstants.getTables(sourceEngine.getTablePrefix());

List<String> tableNames = new ArrayList<String>();

Expand Down Expand Up @@ -351,6 +352,25 @@ protected List<DbCompareTables> loadTables(List<String> tableNames, List <String
continue;
}

if (config.isUseSymmetricConfig()) {
String catalog = null;
String schema = null;
if (!StringUtils.equals(sourceEngine.getDatabasePlatform().getDefaultCatalog(), sourceTable.getCatalog())) {
catalog = sourceTable.getCatalog();
}
if (!StringUtils.equals(sourceEngine.getDatabasePlatform().getDefaultSchema(), sourceTable.getSchema())) {
schema = sourceTable.getSchema();
}

TriggerHistory hist = sourceEngine.getTriggerRouterService().findTriggerHistory(catalog, schema,
sourceTable.getName());
if (hist != null) {
sourceTable = sourceTable.copyAndFilterColumns(hist.getParsedColumnNames(), hist.getParsedPkColumnNames(), true);
} else {
log.warn("No trigger history found for {}", sourceTable.getFullyQualifiedTableName());
}
}

DbCompareTables tables = new DbCompareTables(sourceTable, null);

String targetTableName = null;
Expand Down

0 comments on commit 4e5a37e

Please sign in to comment.