Migrating only a subset of Flyway migrations

How to force Flyway to only apply a subset of the migrations and ignore the rest using Java?

Upvotes: 1

Views: 126

Answers (1)

markdsievers
markdsievers

Reputation: 7309

Callbacks are handy but can't stop a migration from happening.

You need to implement MigrationResolver and MigrationExecutor in order to catch certain situations.

I must say though, this sounds like a precarious solution to implement for the sake of repeatable schema evolution. Perhaps you could elaborate on the situation that requires you to do this.

Upvotes: 1

Related Questions