Mehrad Sadegh
Mehrad Sadegh

Reputation: 1134

Using values defined in Liquibase property file inside CDATA tag

Unfortunately we don't use Liquibase built-in tags at work and it's already too late to fix the existing changesets. Has anyone tried to pass parameters to queries wrapped in CDATA tag without modifying the Liquibase maven plugin? However, Adding a new maven build plugin is ok.

<changeSet id="XXXXX" author="Mehrad">    
    <sql>
    <![CDATA[
        DO SOMETHING USING THE PARAMETER.. 
    ]]>
    </sql>

    <rollback><sql><![CDATA[ do something else ]]></sql></rollback>
</changeSet>

Upvotes: 1

Views: 1241

Answers (1)

Nathan Voxland
Nathan Voxland

Reputation: 15773

Liquibase support changelog paramters which I think is what you are looking for. You should be able to use then in CDATA blocks, especially with the later (3.2.2+) versions of Liquibase.

Upvotes: 1

Related Questions