I have a spring boot app(v2.3.3) which contains Liquidbase tool to create my table and initialise it. When I start spring boos it is working fine, the tables are created and data inserted by using sql scripts and the Liquidbase configs are shown below:
application.yml:
spring:
liquibase:
change-log: classpath:db/db.master.xml
src/main/resources/db: db.master.xml
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<includeAll path="scripts/" relativeToChangelogFile="true"/>`enter code here`
</databaseChangeLog>
src/main/resources/db/script/
- 001.createTableAudit.sql
- 002.insertDataTableAudit.sql
Let say I want to rollback 002.insertDataTableAudit.sql, is it possible rollback the insertDataTableAudit when starting my Spring Boot App?
I know it can be done by maven : mvn liquibase:rollback but is it possible to acheive the same thing with Spring Boot?
Thanks in advance