cubicweb #2797575 implicit rollback on error while dropping UniqueTogether constraint [validation pending]

The CWUniqueTogetherConstraintDelOp operation tries to ignore errors caused by a DROP INDEX if the index already exists. This code was introduced in CW 3.15.5 by revision 73469aa94afe to fix #2465393. The problem is that psycopg2+postgresql+lgdb will automatically rollback the transaction if the sql statement fails, therefore not removing the corresponding CWUniqueTogetherConstraint from the database.

A better fix might be to implement a if_exists version of dbhelper.sqls_drop_multicol_unique_index that returns:

DROP INDEX IF EXISTS ...

and use it in the operation.

prioritynormal
typebug
done in3.18.0
load0.500
load left0.000
closed by<not specified>
patchBackout changeset 73469aa94afe (closes #2797575) [rejected]