For anyone with the same question but who can't access the Link of @Axel Fontaine anymore
https://documentation.red-gate.com/fd/flyway-lock-retry-count-setting-277579009.html
At the start of a migration, Flyway will attempt to take a lock to prevent competing instances executing in parallel. If this lock can't be obtained straight away, Flyway will retry at 1s intervals, until this count is reached, at which point it will abandon the migration. A value of -1 indicates that Flyway should keep retrying indefinitely.