HHH-14023 H2Dialect: adjust NUMERIC, DECIMAL & VARBINARY for 1.4.201+

This commit is contained in:
Falko Modler 2020-05-17 18:21:08 +02:00 committed by Andrea Boriero
parent a5b1d4ea07
commit 8b78ad7685
1 changed files with 3 additions and 3 deletions

View File

@ -118,8 +118,8 @@ public class H2Dialect extends Dialect {
registerColumnType( Types.BIT, "boolean" ); registerColumnType( Types.BIT, "boolean" );
registerColumnType( Types.CHAR, "char($l)" ); registerColumnType( Types.CHAR, "char($l)" );
registerColumnType( Types.DATE, "date" ); registerColumnType( Types.DATE, "date" );
registerColumnType( Types.DECIMAL, "decimal($p,$s)" ); registerColumnType( Types.DECIMAL, buildId >= 201 ? "numeric($p,$s)" : "decimal($p,$s)" );
registerColumnType( Types.NUMERIC, "decimal($p,$s)" ); registerColumnType( Types.NUMERIC, buildId >= 201 ? "numeric($p,$s)" : "decimal($p,$s)" );
registerColumnType( Types.DOUBLE, "double" ); registerColumnType( Types.DOUBLE, "double" );
registerColumnType( Types.FLOAT, "float" ); registerColumnType( Types.FLOAT, "float" );
registerColumnType( Types.INTEGER, "integer" ); registerColumnType( Types.INTEGER, "integer" );
@ -132,7 +132,7 @@ public class H2Dialect extends Dialect {
registerColumnType( Types.TIME, "time" ); registerColumnType( Types.TIME, "time" );
registerColumnType( Types.TIMESTAMP, "timestamp" ); registerColumnType( Types.TIMESTAMP, "timestamp" );
registerColumnType( Types.VARCHAR, "varchar($l)" ); registerColumnType( Types.VARCHAR, "varchar($l)" );
registerColumnType( Types.VARBINARY, "binary($l)" ); registerColumnType( Types.VARBINARY, buildId >= 201 ? "varbinary($l)" : "binary($l)" );
registerColumnType( Types.BLOB, "blob" ); registerColumnType( Types.BLOB, "blob" );
registerColumnType( Types.CLOB, "clob" ); registerColumnType( Types.CLOB, "clob" );