diff --git a/symmetric-db/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlBuilder.java b/symmetric-db/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlBuilder.java index 19525047df..5c5e16c31e 100644 --- a/symmetric-db/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlBuilder.java +++ b/symmetric-db/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlBuilder.java @@ -382,13 +382,6 @@ public String getSqlType(Column column) { sqlType = tmpSqlType.toString(); } } - pc = column.getPlatformColumns() == null ? null : column.getPlatformColumns().get(DatabaseNamesConstants.ORACLE); - if (pc == null) { - pc = column.getPlatformColumns() == null ? null : column.getPlatformColumns().get(DatabaseNamesConstants.ORACLE122); - } - if (pc != null && "LONG".equals(pc.getType())) { - sqlType = "LONGTEXT"; - } if ("TINYBLOB".equalsIgnoreCase(column.getJdbcTypeName())) { // For some reason, MySql driver returns BINARY type for TINYBLOB instead of BLOB type sqlType = "TINYBLOB"; @@ -402,6 +395,13 @@ public String getSqlType(Column column) { sqlType = "LONGTEXT"; } } + pc = column.getPlatformColumns() == null ? null : column.getPlatformColumns().get(DatabaseNamesConstants.ORACLE); + if (pc == null) { + pc = column.getPlatformColumns() == null ? null : column.getPlatformColumns().get(DatabaseNamesConstants.ORACLE122); + } + if (pc != null && ("LONG".equals(pc.getType()) || "CLOB".equals(pc.getType()) || "NCLOB".equals(pc.getType()))) { + sqlType = "LONGTEXT"; + } return sqlType; } }