Hey guys,
Since Liquibase 4.22.0, a changeset with an sql block with dbms is ignored in updateSQL, even when the database matches dbms.
So for I have seen this effecting postgresql and oracle databases (mssql appears to be working though).
And occurs against a real DB or with an offline connection.
Example:
<changeSet id="my_id" author="admin">
<sql dbms="postgresql">
<!-- any native sql -->
</sql>
<sql dbms="oracle">
<!-- any native sql -->
</sql>
</changeSet>
Maven plugin config:
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>4.23.0</version>
<executions>
<execution>
<id>generate-scripts-postgres</id>
<phase>process-resources</phase>
<goals>
<goal>updateSQL</goal>
</goals>
<configuration>
<propertyFile>liquibase/liquibase.properties</propertyFile>
<changeLogFile>liquibase/changelog-master.xml</changeLogFile>
<clearCheckSums>true</clearCheckSums>
<!--
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql://localhost:5432/postgres</url>
<defaultCatalogName>public</defaultCatalogName>
<username>xxx</username>
<password>xxx</password>
-->
<driver>org.postgresql.Driver</driver>
<url>offline:postgresql?version=11</url>
</configuration>
</execution>
</executions>
</plugin>
Downgrading the plugin version to 4.21.0 fixes the issue.