[jOOQ/jOOQ#18965] Bad DDL generated when attempting to CREATE TABLE with
UUID column in Oracle and other dialects
This commit is contained in:
parent
f336955121
commit
233fa3e981
@ -6166,8 +6166,14 @@ final class Tools {
|
||||
}
|
||||
}
|
||||
|
||||
String typeName = type.getTypeName(ctx.configuration());
|
||||
|
||||
// [#5807] These databases cannot use the DataType.getCastTypeName() (which is simply char in this case)
|
||||
if (type.getFromType() == UUID.class && NO_SUPPORT_CAST_TYPE_IN_DDL.contains(ctx.dialect())) {
|
||||
// [#18965] Or, they require a length, but UUID.hasLength() is false
|
||||
if (type.getFromType() == UUID.class && (
|
||||
NO_SUPPORT_CAST_TYPE_IN_DDL.contains(ctx.dialect())
|
||||
|| typeName.startsWith("varchar")
|
||||
)) {
|
||||
toSQLDDLTypeDeclaration(ctx, VARCHAR(36));
|
||||
return;
|
||||
}
|
||||
@ -6182,7 +6188,6 @@ final class Tools {
|
||||
}
|
||||
|
||||
DataType<?> elementType = type.getArrayBaseDataType();
|
||||
String typeName = type.getTypeName(ctx.configuration());
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user