0

I have this changeset

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">

<changeSet id="1" author="fabio">
   <createTable tableName="${table.name}">
           <column name="NEW_2" type="int">
           </column>
    </createTable>
 </changeSet>
 </databaseChangeLog>

and I am trying to replace the table name by the value of the property that is in my liquibase.properties file

table.name=NEW_TABLE

But instead of creating the new table with the name "NEW_TABLE" it creates it with the name "${table.name}".

What am I doing wrong?

Fábio Pires
  • 89
  • 1
  • 2
  • 10

1 Answers1

1

That is likely related to this issue with Liquibase 4.21.0 and hasn't been fixed in 4.21.1.

"Properties are not being substituted" https://github.com/liquibase/liquibase/issues/4129

Until we get a fix release, you can try using an earlier version. Or you can use a system property, which are getting substituted correctly.