on H2 prior to 2.0 map NUMERIC to DECIMAL

This is helpful the schema update tool.

This workaround was lost during my work on Dialects.
This commit is contained in:
Gavin King 2020-08-25 12:42:55 +02:00 committed by Christian Beikov
parent f48dd846f8
commit 34cb6d50d9
1 changed files with 6 additions and 0 deletions

View File

@ -117,6 +117,12 @@ public class H2Dialect extends Dialect {
this.sequenceInformationExtractor = SequenceInformationExtractorNoOpImpl.INSTANCE;
this.querySequenceString = null;
}
if ( version < 200 ) {
// prior to version 2.0, H2 reported NUMERIC columns as DECIMAL,
// which caused problems for schema update tool
registerColumnType( Types.NUMERIC, "decimal($p,$s)" );
}
}
private static int parseBuildId(DialectResolutionInfo info) {