How can I populate Liquibase parameter values from an external properties file?

Viewed 17496

Is there any way that I can populate parameters in a Liquibase changelog file based on the contents of an external property file?

As in, I would like to be able to say:

<createTable tableName="${table.name}">
     <column name="id" type="int"/>
     <column name="${column1.name}" type="varchar(${column1.length})"/>
     <column name="${column2.name}" type="int"/>
</createTable>

And keep the value of table.name and the other parameters in an external file db.properties, and reference this file either from within the changelog, or from the Liquibase command line, or as an option of the Maven plugin that runs liquibase.

I can't seem to find any way to do this, is it possible?

2 Answers
Related