Is it possible to pass changelog parameter values via --defaultsFile?

Nope, not that. The statements I’m parameterizing are UPDATEs that use the current database to read data and a different database to write data:

      UPDATE ${target}.foo (x, y, z)

      SELECT x, y, z FROM bar

It’s a good thought, but I think --defaultSchema just moves the problem around.


We’re in a situation where we’d like to use changelog parameters to identify the target schema for some changes (we’re on MySQL, and the “schema” - database - names vary from environment to environment). Ideally, I’d tell folks to stuff the appropriate values in their file, put some sensible defaults in the migration files, and move on, but this doesn’t appear to work:

Unexpected error running Liquibase: Unknown parameter: ‘schema’

Unexpected error running Liquibase: Unknown parameter: ‘Dschema’

Is this possible? Or is there another good way to handle this that doesn’t lead to having a different command line for each environment?

I think you want the

Oh, I see.  I think you’re out of luck with respect to the properties file.

You could always try the nuclear option (-DyourPropertyHere=foobar).  Ick, but it’s crazy enough it might just work!


I have a very similar use case for this. Did anyone find a good solution? My ideal would be to be able to set a value in a file and have that property substituted inside a change.