From e709852fa67e104c35777a15dcf2889cef4b224e Mon Sep 17 00:00:00 2001 From: Eric Long Date: Mon, 1 Aug 2022 15:23:26 -0400 Subject: [PATCH] 0005370: Send schema DDL detects widened varchar but does not alter --- .../db/platform/AbstractDdlBuilder.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDdlBuilder.java b/symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDdlBuilder.java index 02501fb510..ad2d6a9b32 100644 --- a/symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDdlBuilder.java +++ b/symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDdlBuilder.java @@ -323,32 +323,7 @@ public String alterTable(Table currentTable, Table desiredTable, return alterDatabase(currentModel, desiredModel, alterDatabaseInterceptors); } - /** - * When the platform columns were added alters were not taken into consideration. Therefore, we copy the desiredPlatformColumn to the current platform - * column because the alter code ends up using the current column to come up with the alter statements. This is a hack that depends on the fact that none of - * the alter decision are based upon the current column's platform column. - */ protected void mergeOrRemovePlatformTypes(Database currentModel, Database desiredModel) { - Table[] currentTables = currentModel.getTables(); - for (Table currentTable : currentTables) { - /* - * Warning - we don't currently support altering tables across different catalogs and schemas, so we only need to look up by name - */ - Table desiredTable = findTable(desiredModel, currentTable.getName()); - if (desiredTable != null) { - Column[] currentColumns = currentTable.getColumns(); - for (Column currentColumn : currentColumns) { - Column desiredColumn = desiredTable.getColumnWithName(currentColumn.getName()); - if (desiredColumn != null) { - currentColumn.removePlatformColumn(databaseName); - PlatformColumn desiredPlatformColumn = desiredColumn.findPlatformColumn(databaseName); - if (desiredPlatformColumn != null) { - currentColumn.addPlatformColumn(desiredPlatformColumn); - } - } - } - } - } } /**