To reproduce, clone this gist and then execute:
docker-compose up -d
flyway migrate
You'll see the output:
Flyway OSS Edition 10.7.1 by Redgate
See release notes here: https://rd.gt/416ObMi
Database: jdbc:postgresql://localhost:8080/postgres (PostgreSQL 16.1)
Schema history table "public"."flyway_schema_history" does not exist yet
Successfully validated 2 migrations (execution time 00:00.015s)
Creating Schema History table "public"."flyway_schema_history" ...
Current version of schema "public": << Empty Schema >>
Migrating schema "public" to version "1 - table"
Migrating schema "public" to version "2 - index" [non-transactional]
At this point flyway will hang forever.