Sometimes the same property is used multiple times, or cannot be saved in files, or Operating system
or environment-dependent
, to substitute those variables in ChangeSet
while executing, Liquibase
allows to define a placeholder
in ChangeSet
and will replace those dynamically
at run time.
Liquibase
starts looking for dynamic properties in the below order
- Command line arguments
- ServletConfig init parameters
- ServletContext init parameters
- Java system properties JAVA_OPTS Environment Variable
- OS environment variables
- Configuration data, such as the Liquibase properties file, piped standard input, or default files
Lets understand these with example