Branch: refs/heads/main
Home:
https://github.com/hibernate/hibernate-orm
Commit: 41c71bfed7d8eb74bd0574ed7bd2552d055dcf46
https://github.com/hibernate/hibernate-orm/commit/41c71bfed7d8eb74bd0574e...
Author: Emmanuel Duchastenier <emmanuel.duchastenier(a)bonitasoft.com>
Date: 2021-04-30 (Fri, 30 Apr 2021)
Changed paths:
M
hibernate-core/src/main/java/org/hibernate/tool/schema/internal/AbstractSchemaMigrator.java
A
hibernate-core/src/test/java/org/hibernate/tool/schema/internal/AbstractSchemaMigratorTest.java
Log Message:
-----------
HHH-13779 (5.4) - Foreign key schema migrator should be case-insensitive
This avoids re-creating existing foreign keys with a different name,
after migrating from Hibernate 4 to Hibernate 5 (as implicit naming
convention has changed).
Actually, some RDBMS allow it (PostgreSQL, MySQL, MS SQL Server, ...)
and duplicate the same key, whereas others (Oracle, ...) do not
allow it and Schema update fails.
This fix ignores the case of the table and column name when checking
if a equivalent Foreign Key already exists (whatever its name)
Closes
https://hibernate.atlassian.net/browse/HHH-13779
(cherry picked from commit 0b819863f2cee41c7067d7e3656356f0b1221ef1)