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

Update (or any other command) with label also include changelogs without labels. #1660

Closed
amarjeetkapoor1 opened this issue Jan 28, 2021 · 2 comments

Comments

@amarjeetkapoor1
Copy link

amarjeetkapoor1 commented Jan 28, 2021

If I issue an update command with the label "a". It also applies a changelog without any label.

e.g.

<changeSet author="amarjeetkapoor" id="1" labels="a">
     <createIndex ....</createIndex>
 </changeSet>
 <changeSet author="amarjeetkapoor" id="2" >
     <createIndex ....</createIndex>
 </changeSet>

and I liquibase.changeLogSync(new Contexts(this.getContexts()), new LabelExpression("a")); or liquibase.update(new Contexts(this.getContexts()), new LabelExpression("a"));

changelog with id 2 is also getting logged in DB, when It should be just changelog with id ="1" as that only have been labeled "a"

Plus, there is no way to mention label expression to say not to include changelogs without a label.

Version of liquibase: 4.0.0

@molivasdat
Copy link
Contributor

Hi @amarjeetkapoor1 Yes that is how Liquibase works. If there is no label, it is eligible to be deployed to the database.
https://docs.liquibase.com/concepts/advanced/labels.html
If you run the liquibase --labels=release3 update command, it will deploy all changesets with the label release3 and all changesets without any label.

@FBurguer
Copy link

FBurguer commented Oct 6, 2022

As Mike said, this is how liquibase is designed. I dont belive we are changing that behavior any time soon.

@FBurguer FBurguer closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants