1
votes

I'm trying to upgrade Liquibase from 3.3.1 to 3.10.3. Existing changesets are failing because varchar values being udpated are now inserting additional single quotes. Given the following statement in a changeset:

<update tableName="foo_table">
    <column name="foo_id" type="VARCHAR(32)" value="'a'"/>
    <where>bar_id REGEXP 'A'</where>
</update>

Liquibase seems to be adding additional single quotes in 3.10.3 so that values in the database are now stored with single quotes. Removing the single quotes from value in the changeset corrects the issue but will change the checksum on many of our changesets. I was wondering if there were any options available that will avoid us from needing to do that.

1
Have you tried the latest version 4.x? I believe we are at 4.2. Same issue?ronak
If this is a bug on 3.10, you could either open a PR to fix it, or log an bug issue to have it resolved: github.com/liquibase/liquibase/issuesronak

1 Answers

2
votes

One option would be to create a new changelog (you can keep your old one, refer to both in order using includeAll in a master changelog). In the new changelog, you can just create your changes in sql.

This would allow you to write the change as sql exactly the way you want it, and liquibase would not have to render the sql based on xml.