As part of using hooks for violation updates we added the column constraint_version (https://gerrit.wikimedia.org/r/#/c/221080/) to the violation table. Since we don't use the table in v1 we didn't have anything further to do but for v2 - after we changed the schema - we need to ...
... add the constraint_version to the violation class
... compute the constraint_version and insert it into the table
... adapt the SqlViolationRapo for that