Schema migrator should use case insensitive column comparison of foreign keys

Description

Some databases use upper-case column names. Thus, the schema migrator should use case-insensitive comparison, in case entity column definitions use lower-case column names.

Since this is currently not done, the migrator might try to re-create a foreign key and fail, if comparing the name of the foreign key also fails. This results in many exceptions that pollute the log and make it very hard to read.

org.hibernate.tool.schema.internal.AbstractSchemaMigrator.checkForExistingForeignKey:

To fix this, existingReferencingColumn could be obtained just like existingReferencedTable:

See test case in

 

Environment

None

Assignee

Unassigned

Reporter

Olaf Ziems

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure