Custom change: can I designate a field as not affecting the checksum?

We are using Liquibase 2.0.1.  (Subsequent versions add PRIMARY KEY DDL fragments to almost every DDL line in the Informix support.)


Here are my class signatures, condensed etc. for brevity:


Laird Nelson - Bainbridge Island, Washington, Oracle, Amherst College, Lakeside School | about.me

Is there a way to designate a particular attribute of a custom change as not affecting the changeset’s checksum?


Background: I’ve written a column copying change/refactoring element that accomplishes copying and data conversion through a JDBC driver, rather than in SQL (Informix, curse its awful soul, can’t convert a VARCHAR to a TEXT column in SQL).  To make this reasonably performant I’ve added a fetchSize attribute.  I now can’t add this attribute to our existing usages of this custom refactoring element because it alters the checksum of the changeset of which they are a part.


I know that Liquibase features some annotations to help in this general area, but I couldn’t find anything obvious.


Best,

Laird


http://about.me/lairdnelson

What version of liquibase are you using? 2.x? And by “custom change” do you mean a customChange implementation or a class that actually extends the Change interface as a liquibase extension?

Nathan

That’s what I was trying to remember; thank you!


http://about.me/lairdnelson

Thanks for finding that nessumo. I did create https://liquibase.jira.com/browse/CORE-1330 to separate out whether a field is serializable from whether it is used in checksums.


Nathan

I guess you can use AnonymousChange for exemplary use.

In 3.0.7 the annotation changed to DatabaseChangeProperty. There is probably too much connection between “all properties” and “serializable properties” and “properties to checksum”. I should clean that up more in 3.1.  


You can set the @DatabaseChangeProperty(isChangeProperty  = false) attribute and that should allow your change to still work but will not try to checksum it.


I created https://liquibase.jira.com/browse/CORE-1634 to track the API changes


Nathan

Hmm… I have problem now, during upgrade to 3.0.7. Above annotation is no longer available, but your issue is not yet solved. Any idea? :wink:

I know this is a very old issue, but I think I have a similar problem, where a property is marked as being associated to a specific RDBMS which then changes e.g. ‘mysql’ to ‘mariadb’.

For example, for years we had:
<property name="now" value="now()" dbms="mysql"/>
When we migrated to mariadb, this property becomes unset, and we must change the changeset to:
<property name="now" value="now()" dbms="mariadb"/>
However this calculates a change in the checksum and running a migration fails. We can clear the checksums but it would be nice to have a future proof way of saying “this change is not significant to the checksum”.

See also discussion at potential feature - ignore checksum - #3 by un1376926463332r33id

Is this annotation DatabaseChangeProperty available, and how would we use it in an XML file, please?