Skip to content

Commit

Permalink
Merge branch '3.7' of https://github.com/JumpMind/symmetric-ds.git in…
Browse files Browse the repository at this point in the history
…to 3.7
  • Loading branch information
chenson42 committed Sep 11, 2015
2 parents b3e014e + 848fd93 commit 420956e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Expand Up @@ -116,7 +116,7 @@ public Set<String> routeToNodes(SimpleRouterContext context, DataMetaData dataMe

protected Table toAuditTable(Table table) {
Table auditTable = table.copy();
String tableName = table.getName();
String tableName = engine.getDatabasePlatform().alterCaseToMatchDatabaseDefaultCase(table.getName());
if (!FormatUtils.isMixedCase(tableName)) {
tableName = tableName.toUpperCase();
}
Expand All @@ -134,7 +134,6 @@ protected Table toAuditTable(Table table) {
}
auditTable.removeAllForeignKeys();
auditTable.removeAllIndices();
engine.getDatabasePlatform().alterCaseToMatchDatabaseDefaultCase(auditTable);
return auditTable;
}

Expand Down
Expand Up @@ -257,6 +257,12 @@ protected Database getDatabase(Table[] tables) {
db.addTable(newTable);
}
}
else if (addDropTable) {
for (Table table : tables) {
Table newTable = (Table) table.clone();
db.addTable(newTable);
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -484,6 +490,13 @@ protected void startTable(Table table) {
DatabaseXmlUtil.write(table, writer);
}
}
else if (addDropTable) {
if (format == Format.SQL) {
IDdlBuilder target = DdlBuilderFactory.createDdlBuilder(compatible
.toString().toLowerCase());
write(target.dropTables(getDatabase(table)));
}
}

writeComment("DbExport: "
+ StringUtils.defaultString(IoVersion.getVersion().version()));
Expand Down

0 comments on commit 420956e

Please sign in to comment.