Skip to content

Commit

Permalink
Fix #2698: Execute migrations in cherryPick defined order
Browse files Browse the repository at this point in the history
  • Loading branch information
DoodleBobBuffPants committed Nov 16, 2020
1 parent a76950a commit 1d93982
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions flyway-commandline/src/main/assembly/flyway.conf
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ flyway.locations=filesystem:sql
# flyway.target=

# Comma separated list of migrations that Flyway should consider when migrating.
# Migrations are considered in the order that they are supplied to cherryPick
# Leave blank to consider all discovered migrations.
# Values should be the version for versioned migrations (e.g. 1, 2.4, 6.5.3) or the description for repeatable migrations (e.g. Insert_Data, Create_Table)
# Flyway Teams only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.flywaydb.core.internal.util.AbbreviationUtils;

import java.util.Date;
import java.util.stream.IntStream;

/**
* Default implementation of MigrationInfo.
Expand Down Expand Up @@ -459,8 +460,25 @@ private String createMismatchMessage(String mismatch, String migrationIdentifier
migrationIdentifier, applied, resolved);
}









@Override
public int compareTo(MigrationInfo o) {









if ((getInstalledRank() != null) && (o.getInstalledRank() != null)) {
return getInstalledRank() - o.getInstalledRank();
}
Expand Down

0 comments on commit 1d93982

Please sign in to comment.