FlywayException: Invalid flag FlywayException: Invalid flag

FlywayException: Invalid flag

Flyway expects three forms of instruction:

Commands
Flags
Parameters

This exception is most often caused by either a syntax issue or nuances of the platform in use and the syntax not being handled in the expected manner.

Unlike a parameter which requires an argument to be supplied (including an implicit default), a flag operates in isolation and doesn't take an argument.

In most cases, a syntax error, such as character escape, causes a parameter and its value to become separated. When this happens, Flyway interprets the parameter as a flag, which is then treated as invalid.

The incorrect value will be shown alongside the invalid flag, so once you know what to look for, it should be clear where the error originates.