Skip to content

Commit 1c98c9e

Browse files
committed
Revert "HHH-3192 - SchemaValidator column nullability check"
This reverts commit 3b8dc32.
1 parent 5612c9b commit 1c98c9e

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ protected void validateTable(
139139
);
140140
}
141141
validateColumnType( table, column, existingColumn, metadata, dialect );
142-
validateColumnNullability( table, column, existingColumn );
143142
}
144143
}
145144

@@ -165,22 +164,6 @@ protected void validateColumnType(
165164
}
166165
}
167166

168-
private void validateColumnNullability(Table table, Column column, ColumnInformation existingColumn) {
169-
if ( existingColumn.getNullable() == Boolean.FALSE ) {
170-
// the existing schema column is defined as not-nullable
171-
if ( column.isNullable() ) {
172-
// but it is mapped in the model as nullable
173-
throw new SchemaManagementException(
174-
String.format(
175-
"Schema validation: column defined as not-null in the database, but nullable in model - [%s] in table [%s]",
176-
column.getName(),
177-
table.getQualifiedTableName()
178-
)
179-
);
180-
}
181-
}
182-
}
183-
184167
protected void validateSequence(Sequence sequence, SequenceInformation sequenceInformation) {
185168
if ( sequenceInformation == null ) {
186169
throw new SchemaManagementException(

0 commit comments

Comments
 (0)