How does liquibase rollback works with springboot application? Would appreciate your inputs.
Here is what i tried - I am creating TableA and TableB in Oracle within a changeset.
TableB already exists in the database, I expect liquibase to rollback TableA as changeset fails while creating TableB but liquibase creating TableA and failing with the below error and never executes rollback block, which is strange:
Caused by: liquibase.exception.DatabaseException: ORA-00955: name is already used by an existing object
Liquibase Configuration:
<changeSet id="rollback" author="test_user">
<validCheckSum>any</validCheckSum>
<sqlFile path="db/changelog/changes/DML/ddl.sql"/>
<sqlFile path="db/changelog/changes/DML/ddl.sql"/>
<rollback> drop table TABLEA;</rollback>
<rollback> drop table TABLEB;</rollback>
</changeSet>
ddl.sql
CREATE TABLE TABLEA
(
TEST_COL VARCHAR2(100)
);
dml.sql
CREATE TABLE TABLEB
(
TEST_COL VARCHAR2(100)
);