Where do I find an exact definition of what is part of checksum calculation under which circumstances?

Hi everyone,

I would like to know exactly what is part of checksum calculation and what is not in the various different ways a changeset can be writte. We have YAML, XML embedded SQL, SQL in external files and I only find different hints on how things behave at various different places, but I can’t find any summary for all of the cases.

What I’ve found so far are some blog statements about newlines, spaces:

  • Reformatting whitespace and line breaks (except within SQL statements)
  • Changing preconditions
  • Changing contexts
  • Changing labels
  • Adding validCheckSum settings
  • Changing comments (via native xml/yaml comments or using the comment tag)

That blog doesn’t mention how properties to substitute are handled. I’ve found those mentioned in the following statement, but only for SQL and external SQL files:

You can use property substitution with the sql and sqlFile Change Types. Note that Liquibase obtains the checksum of a sql changeset after substituting any properties you specify. However, it obtains the checksum of a sqlFile changeset before substituting the properties in the external SQL file.

But in my concrete case I’m interested in the following XML changeset using a property to handle the type. I have trouble finding docs about if the checksum is calculated before or after substituting the property in this case and with different behaviour for SQL and SQL-FILE documented above, the answer doesn’t seem to be trivial, but an explicit dersign decision.

<changeSet author="[...]" id="[...]">
	<addColumn tableName="FOO">
		<column name="BAR" type="${type.string.max.80}" />

So, would be great if someone could point me to better docs than what I’ve found so far, which especially answer my concrete use-case.