Skip to content

Commit

Permalink
Moved the logic up a level. This is specific to the unexpected sets, …
Browse files Browse the repository at this point in the history
…so I expanded the removeIf predicate to be two conditions. This solves the issue of changesets not showing up in the DBCL table.
  • Loading branch information
Tylorjg committed Feb 15, 2024
1 parent ebb40f8 commit 25f033b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public String toString() {

public boolean isSameAs(ChangeSet changeSet) {
String normalizedFilePath = DatabaseChangeLog.normalizePath(this.getChangeLog());
return normalizedFilePath.equalsIgnoreCase("liquibase-internal") || (this.getId().equalsIgnoreCase(changeSet.getId())
return (this.getId().equalsIgnoreCase(changeSet.getId())
&& this.getAuthor().equalsIgnoreCase(changeSet.getAuthor())
&& isSamePath(changeSet.getFilePath(), normalizedFilePath));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public Direction getDirection() {

@Override
public void visit(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database, Set<ChangeSetFilterResult> filterResults) throws LiquibaseException {
unexpectedChangeSets.removeIf(ranChangeSet -> ranChangeSet.isSameAs(changeSet));
unexpectedChangeSets.removeIf(ranChangeSet -> ranChangeSet.isSameAs(changeSet) || ranChangeSet.getChangeLog().equalsIgnoreCase("liquibase-internal"));
}

public Collection<RanChangeSet> getUnexpectedChangeSets() {
Expand Down

0 comments on commit 25f033b

Please sign in to comment.