MigrationInfoImpl violates the compareTo contract #1249
MigrationInfoImpl compareTo violates the required contract for repeatable migrations, i.e. those with a null version.
Migration 1: R__C.sql is applied - installed rank is 5
For migration 3 there is a new repeatable migration, R__B.sql. If these 3 objects are compared in MigrationInfoImpl.compareTo then:
This is logically impossible and causes the sort method to throw an exception. But not reliably, it depends on the internal workings of the sort method.
What version of Flyway are you using?
What database are you using (type & version)?
SQL Server 2012
What operating system are you using?
What did you do?
I have some normal migrations and a bunch of repeatable migrations. The defect occurs when there are existing applied repeatable migrations and some new repeatable migrations.
What did you expect to see?
That the new repeatable migrations would be applied.
What did you see instead?
Exception from sorting collection of MigrationInfoImpl
The text was updated successfully, but these errors were encountered:
using Oracle 12c (184.108.40.206.0)