Is there any way to execute a sql tag (or sql statement) by liquibase without writing a row in the databasechangelog table?
My situation is the next:
I want to execute, more than once, a sql file with the same Author, same ID and same FileName. Sometimes the file is unchanged so I put runAlways=“true” in changeSet Tag. Other times the file is changed so a liquibase.exception.ValidationFailedException is launched to the user. To force the execution of the file in validationFailedException case, a user variable is used. If this variable is true, a liquibase xml is exuted previously:
-
<?xml version="1.0" encoding="UTF-8"?>
http://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
update DATABASECHANGELOG SET MD5SUM=NULL WHERE AUTHOR='${author.name}' AND ID='${id.change}';
But I want to execute the tag that updates the md5sum to null using Liquibase without it writing a row (${Author-name}-Forcing md5Sum, ${id.change}, filename…) in the databasechangelog table.