Skip to content

Commit b24a444

Browse files
committed
HHH-18784 TableMigrator shouldn't alter column length if length is not explicitly-set
1 parent 76f2243 commit b24a444

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/tool/schema/internal/ColumnDefinitions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static boolean hasMatchingType(Column column, ColumnInformation columnInformatio
5151
}
5252

5353
static boolean hasMatchingLength(Column column, ColumnInformation columnInformation, Metadata metadata, Dialect dialect) {
54-
if ( !column.getSqlType( metadata ).contains("(") ) {
54+
if ( !column.isExplicit() || !column.getSqlType( metadata ).contains("(") ) {
5555
// the DDL type does not explicitly specify a length,
5656
// and so we do not require an exact match
5757
return true;

0 commit comments

Comments
 (0)