Skip to content
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

Set UniqueConstraint.clustered to false #204

Conversation

ghost
Copy link

@ghost ghost commented Jun 1, 2019

In Issue #191, neivkovic reported unnecessery recreation of unique constraints. I believe this is due the liqubase-core setting the UniqueConstraint.clustered to true/false. Currently the liquibase-hibernate snapshot does not set UniqueConstraint.clustered at all resulting in a true/false != null, thus it appears the unqiue constraint has changed (See screenshot below).

I only did some light research on whether hibernate can support setting the cluster attribute on a unique constraint, but from what I say this is not possible so I think it is safe to set to false. There could be potential fallout if liquibase-core does not always set the UniqueConstraint.clustered to true/false. I am comparing against Postgresl, which does not support the attribute so I am pretty sure it will set it for other dbs as well.

LiquibaseHibernate-Issue#191

@nvoxland nvoxland merged commit 3f9bb20 into liquibase:master Sep 2, 2019
@nvoxland
Copy link
Contributor

nvoxland commented Sep 2, 2019

thanks!

chase added a commit to gsmsystems/liquibase-hibernate that referenced this pull request Feb 21, 2020
@ghost ghost deleted the fix/Issue#191-unnecessery-recreation-of-unique-constraints branch May 26, 2023 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant