user2536224
user2536224

Reputation: 63

Flyway command line: Invalid argument: -placeholders

What is the exact syntax required to pass a placeholder to flyway command line?

I have attempted to add a placeholder to my flyway command line migrate but getting exceptions when calling it. I have been back to the documentation several times re-checking syntax/case/etc but cannot spot what I am doing wrong here.

It looks something like this

flyway -url="jdbc:postgresql://<host>:<port>/<database>" -user=<user> -password=<pwd> -placeholders.abc=123 migrate -X

And I get this exception

org.flywaydb.core.api.FlywayException: Invalid argument: -placeholders
        at org.flywaydb.commandline.CommandLineArguments.validate(CommandLineArguments.java:183)
        at org.flywaydb.commandline.Main.main(Main.java:86)```

Upvotes: 2

Views: 1295

Answers (1)

user2536224
user2536224

Reputation: 63

Turns out on windows that I needed to enclose the placeholders in double quotes.

flyway -url="jdbc:postgresql://<host>:<port>/<database>" -user=<user> -password=<pwd> "-placeholders.abc=123" migrate -X

Upvotes: 4

Related Questions