==============================================================================
Flyway: a lower-versioned migration lands after a higher one is already applied
==============================================================================
captured: 2026-09-15T07:07:28.552801366Z


-- first startup — V1 and V3 only --
applied: V1, V3

-- second startup — outOfOrder=false (Flyway default) --
context failed to start: FlywayValidateException: Validate failed: Migrations have failed validation
Detected resolved migration not applied to database: 2.
To ignore this migration, set -ignoreMigrationPatterns='*:ignored'. To allow executing this migration, set -outOfOrder=true.
Need more flexibility with validation rules? Learn more: https://help.red-gate.com/help/flyway-cli12/help_4.aspx?topic=flyway-blog/older-posts/customize-validation-rules-with-ignoremigrationpatterns
installed_rank | version | description                               | success
---------------+---------+-------------------------------------------+--------
-1             | NULL    | << Flyway Schema History table created >> | true   
1              | 1       | init                                      | true   
2              | 3       | add note index                            | true   
(3 rows)

-- third startup — outOfOrder=true --
installed_rank | version | description                               | success
---------------+---------+-------------------------------------------+--------
-1             | NULL    | << Flyway Schema History table created >> | true   
1              | 1       | init                                      | true   
2              | 3       | add note index                            | true   
3              | 2       | add note length check                     | true   
(4 rows)
