A new topic, 'Change Log Properties and modifySql', has been made on a board 
you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=590.new#new

The text of the topic is shown below:

Hi Nathan,

    I have a doubt about modifySql and I want to show you this: 

1 - I have this variable 

Code:
temp.variable=hello

2 - If I use it in a change set like this everything works fine (if the 
variable changes, the table is updated with the new value):

Code:
    <changeSet id="testing" author="alexis" runOnChange="true">
        <delete tableName="TEMP_TABLE">
            <where>key = 1</where>
        </delete>
        <insert tableName="TEMP_TABLE">
            <column name="key" value="1"></column>
            <column name="value" value="${temp.variable}"></column>
        </insert>
    </changeSet>

3 - In this other change set... it works fine too:

Code:
    <changeSet id="testing2" author="alexis" runOnChange="true">
        <delete tableName="TEMP_TABLE">
            <where>key = 2</where>
        </delete>
        <sql>insert into temp_table
            (key, value)
            values
            (2, '${temp.variable}');
        </sql>
    </changeSet>

4 - But in this one... it doesn't work like in the others, nothing is updated:

Code:
<changeSet id="testing3" author="alexis" runOnChange="true">
        <delete tableName="TEMP_TABLE">
            <where>key = 3</where>
        </delete>
        <sql>insert into temp_table
            (key, value)
            values
            (3, 'change_me');
        </sql>
        <modifySql>
            <replace replace="change_me" with="${temp.variable}" />
        </modifySql>
    </changeSet>

Is this the correct behavior or should be included in the check that the SQL 
has changed and execute the change set?

Thanks,
Alexis

Unsubscribe to new topics from this board by clicking here: 
http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The LiquiBase Community Forum Team.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Liquibase-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/liquibase-user

Reply via email to