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 written. There’s 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)
https://www.liquibase.com/blog/what-affects-changeset-checksums
That blog e.g. doesn’t explain 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.
https://docs.liquibase.com/concepts/changelogs/property-substitution.html
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. With different behaviour for SQL and SQL-FILE documented above, the answer doesn’t seem to be trivial.
<changeSet author="[...]" id="[...]">
<addColumn tableName="FOO">
<column name="BAR" type="${type.string.max.80}" />
</addColumn>
</changeSet>
So, would be great if someone could point me to docs covering really all of the cases. If these exist at all… 🙂
Thanks!