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
Fixed issue that unique constraint precondition does not honor schemaName attribute on MySQL #5783
Conversation
…Name attribute on MySQL
…ists precondition
Figured out how to use the default schema in a precondition. This fixes all problems in #3977 as far as I can see. |
...e-standard/src/main/java/liquibase/precondition/core/UniqueConstraintExistsPrecondition.java
Outdated
Show resolved
Hide resolved
Hi @mpvvliet, Thank you for taking the time to create this PR. Code changes look good to me. I have only added a comment to ask you for a little improvement. One other thing I would like to ask you is about tests. I think it would be good if we can an integration test for
Thanks in advance, |
@MalloD12 happy to add the test. Any reason it's for Also, I see changeset 32 adds the constraint and changeset 33 removes it. Given the changes, it seems to me that we would want to execute the test with the constraint present in the DB and the changeset having a I'm not too familiar with how these tests work so could be off. :-) |
Hi @mpvvliet, I said I hope it helps you to have a better (high-level) idea of how these tests work, if not please ask and I'll do my best to give you a better picture of them. Thanks, |
@MalloD12 I refactored the code as per your suggestion and added an integration test. The entire test suite passes in my local setup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
Looks good to me. Thanks you for addressing the review comments.
Daniel.
Fixes #3977
Impact
Description
Things to be aware of
Only for MySQL.
Things to worry about
Additional Context