Before this commit, the partner_ref_unique could be changed on the
company even if existing partners share the same internal ref.
Therefore, errors will appear afterwards as DB already contains
duplicates although the policy shouldn't allow it.
With this change, the error will appear as soon as the policy is
changed, so that the data must be fixed before activating the
constraint.