Assume, that we have the following changeset:
<changeSet id="add_ACME_code_to_tbl_acme" author="developer">
<sql>
INSERT INTO tbl_acme(identifier, description, code)
VALUES (nextval('seq_acme'), 'acme description', 'ACME');
</sql>
<rollback>
<delete tableName="tbl_acme">
<where>code = 'ACME'</where>
</delete>
</rollback>
</changeSet>
where I am just trying to insert one row to the table.
The discussion that was started during the code review:
Do we really need to have a rollback section for a simple one-row insert and what exactly we need to do here? (in the case when insert failed, does it make any sense try to remove something that we tried to insert without success?) and what exactly can go wrong with an insert?