-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
UniqueConstaintExistsPrecondition ignores liquibaseSchema property #5907
Comments
I'm not sure - send me please a link to manual for PR. I've found that there is need to add following code to UniqueConstraintSnapshotGenerator
to line 146 and use this object to build query below |
Here are the instructions for submitting a PR - https://contribute.liquibase.com/code/get-started/create-pr/. Let us know if you have any other questions. Thanks for the PR! |
I've recently contributed a fix in #5783 which looks like it might fix this issue in another way. |
Hi. Yes you are right, it looks like this PR should help. |
@bostandyksoft—@mpvvliet's fix has been merged and was released on May 21, 2024 as Liquibase version 4.28.0. Please test to see if the fix addresses your issue and let us know. |
@bostandyksoft and @mpvvliet - have either of you had a chance to test Liquibase 4.28.0 to see if it addresses the issues you were having? |
I've checked it now - it is working now correctly. I saw all of my lost unique constraints |
That's great news. I'll close this ticket as fixed. Thanks! |
Search first
Description
Our Postgres instance database several schemas with same structure, so there are many objects with same name in different schemas.
I found, that when UniquieConstraintExistsPrecondition performs search constraint, it dont use liquibaseSchema property to strict query to found objects only in working schema.
I'm not sure about other preconditions, but it looks like that DatabaseSnapshot dont use this property at all
PS I've researched TableExistsPrecondition. DatabaseSnapshot also dont use this propery. But somewhere SnapshotGenerator adds restriction on
Steps To Reproduce
Initialize Postgres database with 2 schemas.
One schema contains uniqueconstraint, another does not contain.
Roll changeset with UniqueConstaintExistsPrecondition
Expected/Desired Behavior
UniqueConstaintExistsPrecondition ignores uniqueconstraint from another schema
Liquibase Version
4.27.0
Database Vendor & Version
Postgres 12.5
Liquibase Integration
spring boot
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
No response
Additional Context
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: