In Liquibase, update
and delete
change types use a where
query to target a number of rows.
Is there a way to enforce the number of affected rows by these two change types?
Something like the following:
update:
tableName: MY_TABLE
columns:
- column: {name: col1, value: col1_value}
where: col2 = 'col2_value'
expectedResult: 2
The preConditions
is not a suitable solution as:
- the corresponding query is maintained and executed separately from change type’s query
changes
can contain manyupdate
/delete
queries