# Understanding validCheckSum

**URL:** <https://forum.liquibase.org/t/understanding-validchecksum/2536>\
**Category:** Liquibase Development\
**Created:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536 "2012-02-11T00:34:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/1 "2012-02-11T00:34:00Z")

</div>

OK, I have confirmed that my interpretation—not the manual—is correct.  
  
If it is OK with everyone I will update the manual to read:

> Specifies that should Liquibase’s calculation of the Since 1.7

 Best,  
Laird

---

<div class="post-metadata">

**Author:** ![ljnelson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/ljnelson/32/120_2.png) [@ljnelson](https://forum.liquibase.org/u/ljnelson)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/2 "2012-02-11T00:34:00Z")

</div>

I think I have a fundamental misunderstanding of the http://about.me/lairdnelson

---

<div class="post-metadata">

**Author:** ![ljnelson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/ljnelson/32/120_2.png) [@ljnelson](https://forum.liquibase.org/u/ljnelson)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/3 "2012-02-11T00:34:00Z")

</div>

Oops; don’t have the privileges to update the wiki; filed [https://liquibase.jira.com/browse/CORE-1112](https://liquibase.jira.com/browse/CORE-1112) to track it instead.  
  
–  
[http://about.me/lairdnelson](http://about.me/lairdnelson)

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/4 "2012-02-11T00:34:00Z")

</div>

Yeah, I locked down the wiki after a previous spam attack. I’ll get the docs fixed, thanks for the jira entry.

Nathan

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/5 "2012-02-11T00:34:00Z")

</div>

This means you can’t use to mitigate problems when migrating from one Liquibase version to another.&nbsp; For example:

- I apply a changeSet to the DB using Liquibase v1.0, and it generates a hash of X.
- I don’t change the original changeSet, but I update to Liquibase v1.1.&nbsp; Now my changeSet has a hash of Y, and liquibase won’t apply any further changeSets.
- I add Y to the changeSet to control this - telling Liquibase the hash in DATABASECHANGELOG is actually Y not X.&nbsp; I can continue my migration with Liquibase 1.1.  
- Now I update to Liquibase 1.2.&nbsp; The hash of my original changeSet is recomputed as Z.&nbsp; I have to change my existing changeSet to Z.

---

<div class="post-metadata">

**Author:** ![un1391467543310r77id](https://avatars.discourse-cdn.com/v4/letter/u/b77776/32.png) [@un1391467543310r77id](https://forum.liquibase.org/u/un1391467543310r77id)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/6 "2012-02-11T00:34:00Z")

</div>

And, since validCheckSum is a child tag of a changeSet, simply adding the tag causes the checksum to change.&nbsp; To build on your example,

- My changeSet has a hash of X.
- I update Liquibase, so now my changeSet has a hash of Y.
- I add Y to the changeset, but now the checksum is Z because I’ve changed the changeSet.

 

I’m wondering if I’m just misunderstanding the use of the validCheckSum tag…

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/7 "2012-02-11T00:34:00Z")

</div>

The validCheckSum tag is not included in the checksum computation, so it should not change by adding the tag.

Nathan

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/8 "2012-02-11T00:34:00Z")

</div>

Glad you figured it out. Thanks for the update.

Nathan

---

<div class="post-metadata">

**Author:** ![un1391467543310r77id](https://avatars.discourse-cdn.com/v4/letter/u/b77776/32.png) [@un1391467543310r77id](https://forum.liquibase.org/u/un1391467543310r77id)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/9 "2012-02-11T00:34:00Z")

</div>

I stand corrected.&nbsp; When I was playing with valid checksums in version 3.0.7, I was getting behavior that seemed to indicate that the checksum was changing whenever I adding/modified the validCheckSum tag, but it all seems to be working correctly in&nbsp;version 3.1.1.

&nbsp;

Sorry for the confusion,

&nbsp;

Steve

---

<div class="post-metadata">

**Author:** ![un1424944477518r36id](https://avatars.discourse-cdn.com/v4/letter/u/eada6e/32.png) [@un1424944477518r36id](https://forum.liquibase.org/u/un1424944477518r36id)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/10 "2012-02-11T00:34:00Z")

</div>

This is STILL wrong in the manual…

[http://www.liquibase.org/documentation/changeset.html](http://www.liquibase.org/documentation/changeset.html)

> When comparing the changeSet stored in the database with the checksum generated from the current changeSet, do not consider the changeSet changed if the given validCheckSum is in the database.

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [February 11, 2012, 12:34am UTC](https://forum.liquibase.org/t/understanding-validchecksum/2536/11 "2012-02-11T00:34:00Z")

</div>

Thanks for reminding me. I updated the docs, let me know what you think.

Nathan
