Is it possible to escape the Liquibase Changelog Property Substitution?
This is my Changeset:
<changeSet author="me" id="changeSetOne">
<sql>
INSERT INTO TABLE_NAME (VALUE, DESCRIPTION) VALUES (
'${ENVIRONMENT_VARIABLE}/some/path/',
'describe nothing');
</sql>
</changeSet>
The result, with (ENVIRONMENT_VARIABLE = "C:/foo"):
+-----------------+----------------+
|VALUE |DESCRIPTION |
+-----------------+----------------+
|C:/foo/some/path/|describe nothing|
+-----------------+----------------+
But I don't want to replace this placeholder by Liquibase, so my result should look like this:
+----------------------------------+----------------+
|VALUE |DESCRIPTION |
+----------------------------------+----------------+
|${ENVIRONMENT_VARIABLE}/some/path/|describe nothing|
+----------------------------------+----------------+
Is that even possible?
What you seek is a hack or a way to escape (eg:
\${ENVIRONMENT_VARIABLE}
or$${ENVIRONMENT_VARIABLE}
).I don't know if this particular issue relate to that: https://github.com/liquibase/liquibase/issues/1023 but until someone fix it, you will have to use this awesome hack™:
Then, when liquibase see
${dollar}{ENVIRONMENT_VARIABLE}
, it should replace it with${ENVIRONMENT_VARIABLE}
.