Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does making a correction in the rollback block affect the checksum of a liquibase changeset?

Tags:

liquibase

Minor typos were discovered, eg.:

    <rollback>
        <delete tableName="velocity_template">
            <where>id in ("from-address.vm", "myco.from-address.vm")</where>
        </delete>
    </rollback>

to

    <rollback>
        <delete tableName="velocity_template">
            <where>id in ('from-address.vm', 'myco.from-address.vm')  </where>
        </delete>
    </rollback>

Can these be corrected without the need to rollback and re-apply the changeset?

The docs here do not specifically say anything about the rollback block, one way or another: http://www.liquibase.org/2009/03/what-effects-changeset-checksums.html

My local testing suggests that the rollback block is not a part of the checksum calculation.

like image 494
jordanpg Avatar asked Oct 22 '25 05:10

jordanpg


1 Answers

Rollback blocks are not included in the checksum, see:

http://forum.liquibase.org/topic/fixing-and-enforcing-liquibase-rollbacks

But even if they were, you could have used "validCheckSum" sub-tag, which is a generic way to update the changeset post-factum, w/o making it break on databases on which it has already been applied.

like image 99
zeppelin Avatar answered Oct 25 '25 11:10

zeppelin