CRM-12458

upgrade fixes for checking constraint