Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.82 KB

migration-guide.adoc

File metadata and controls

40 lines (25 loc) · 1.82 KB

6.2 Migration Guide

This guide discusses migration from Hibernate ORM version 6.2. For migration from earlier versions, see any other pertinent migration guides as well.

Default DDL type changes

UUID mapping changes on MariaDB

On MariaDB, the type code SqlType.UUID now by default refers to the DDL type uuid, whereas before it was using binary(16). Due to this change, schema validation errors could occur on existing databases.

The migration to uuid requires a migration expression like cast(old as uuid).

To retain backwards compatibility, configure the setting hibernate.type.preferred_uuid_jdbc_type to BINARY.

UUID mapping changes on SQL Server

On SQL Server, the type code SqlType.UUID now by default refers to the DDL type uniqueidentifier, whereas before it was using binary(16). Due to this change, schema validation errors could occur on existing databases.

The migration to uuid requires a migration expression like cast(old as uuid).

To retain backwards compatibility, configure the setting hibernate.type.preferred_uuid_jdbc_type to BINARY.

Column type inference for number(n,0) in native SQL queries on Oracle

Previously, since Hibernate 6.0, columns of type number with scale 0 on Oracle were interpreted as boolean, tinyint, smallint, int, or bigint, depending on the precision.

Now, columns of type number with scale 0 are interpreted as int or bigint depending on the precision.