[#5807] Exception thrown when creating table with SQLDataType.UUID in MySQL
This commit is contained in:
parent
493679b7d0
commit
0736ed2193
@ -123,6 +123,7 @@ import static org.jooq.impl.Keywords.K_START_WITH;
|
||||
import static org.jooq.impl.Keywords.K_THEN;
|
||||
import static org.jooq.impl.Keywords.K_THROW;
|
||||
import static org.jooq.impl.Keywords.K_WHEN;
|
||||
import static org.jooq.impl.SQLDataType.VARCHAR;
|
||||
import static org.jooq.impl.Tools.DataKey.DATA_BLOCK_NESTING;
|
||||
import static org.jooq.tools.reflect.Reflect.accessible;
|
||||
|
||||
@ -3879,6 +3880,17 @@ final class Tools {
|
||||
}
|
||||
}
|
||||
|
||||
// [#5807] These databases cannot use the DataType.getCastTypeName() (which is simply char in this case)
|
||||
if (type.getType() == UUID.class) {
|
||||
switch (ctx.family()) {
|
||||
case MARIADB:
|
||||
case MYSQL: {
|
||||
toSQLDDLTypeDeclaration(ctx, VARCHAR(36));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (type.hasLength()) {
|
||||
|
||||
// [#6289] Some databases don't support lengths on binary types
|
||||
|
||||
Loading…
Reference in New Issue
Block a user