I'm using MySQL database. I'm giving call to an stored procedure for 3 times to insert 3 records. following is the example for the same.
<?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"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.10.xsd
http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-3.10.xsd">
<changeSet id="Demo" author="rambo" runOnChange="true">
<sql splitStatements="true">
CALL insert_animal(NULL, 'Cat', 'Cat', NULL, 0, '', '');
CALL insert_animal(NULL, 'Mouse', 'Mouse', NULL, 0, '', '');
CALL insert_animal(NULL, 'Dog', 'Dog', NULL, 0, '', '');
</sql>
<rollback/>
</changeSet>
</databaseChangeLog>
Now when I update this above script for addition of 4th animal lets say, then I get error and basically it says that record exist with the name Cat and script execution is halted.
What I want to do is, I want to continue the execution even if the SP call to insert any animal fails because its duplicate.
I'm new to liquibase and seeking for some advise on this.