-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hibernet6 Enum type DDL issue #652
Comments
In Postgres, there's a similar problem when we use an "Instant" column with Hibernate. Hibernate creates a type like |
Any updates on this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Env:
Gradle:
Entity class:
Try to use:
gradle diffChangelog
to generate sql file, got:which result in wrong SQL.
expected:
Root cause:
According https://docs.jboss.org/hibernate/orm/6.2/migration-guide/migration-guide.html#ddl-implicit-datatype-enum, Hibernate 6 uses
enum
types on MySQL by default, but Liquibase hibernate6 classColumnSnapshotGenerator#toDataType
cannot processhibernateType
withENUM('ACTIVE', 'INACTIVE')
, this method just keepENUM
as sql type.Workaround:
Right now, we are add:
to make sure still using old stype
VARCHAR
for ENUM.The text was updated successfully, but these errors were encountered: