We are using customTaskChange to integrate our customCode and do some operation in our postgress db. I would like to know when rollback will be called for ExampleCustomTaskChange.
<changeSet id="21" author="nvoxland">
<customChange class="liquibase.change.custom.ExampleCustomTaskChange" helloTo="world"/>
</changeSet>
<changeSet id="22" author="nvoxland">
<tagDatabase tag="2022-03-002"/>
</changeSet>
Java code
@Override
public void execute(Database database) throws CustomChangeException {
Scope.getCurrentScope().getLog(getClass()).info("Hello "+getHelloTo());
}
@Override
public void rollback(Database database) throws CustomChangeException, RollbackImpossibleException {
Scope.getCurrentScope().getLog(getClass()).info("Goodbye "+getHelloTo());
}
There are below things which i would like to know:
How rollback in ExampleCustomTaskChange will be called. I tried with cli and ended up with below error. Do we have alternative way to do the rollback in CustomTaskChange.
mvn liquibase:rollback -D liquibase.rollbackTag=2022-03-001
liquibase version : 3.8.9 Maven version : 3.8.4
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.4:rollback (default-cli) on project ExampleCustomTaskChange: Execution default-cli of goal org.liquibase:liquibase-maven-plugin:3.5.4:rollback failed: An API incompatibility was encountered while executing org.liquibase:liquibase-maven-plugin:3.5.4:rollback: java.lang.AbstractMethodError: Receiver class liquibase.logging.core.Slf4jLogger does not define or inherit an implementation of the resolved method abstract info(Ljava/lang/String;)V of interface liquibase.logging.Logger.