this removes 4 uniqueness validations on RepositoryUser and RepositoryOrganisation.
the two "host_type/login" validations were broken because they don't work for the case where a login changes case (e.g. "FOO" -> "foo"). Another reason is that unique indices already exist for these column pairs (uuid/host_type) (lower(host_type)/lower(login)), so we don't need extra ruby logic to handle these.
in these scenarios, we'll now get a ActiveRecord::RecordNotUnique ... PG::UniqueViolation: ERROR: duplicate key value ... error instead of ActiveRecord::RecordInvalid ... Validation failed: Login must be unique
this removes 4 uniqueness validations on RepositoryUser and RepositoryOrganisation.
the two "host_type/login" validations were broken because they don't work for the case where a login changes case (e.g. "FOO" -> "foo"). Another reason is that unique indices already exist for these column pairs (uuid/host_type) (lower(host_type)/lower(login)), so we don't need extra ruby logic to handle these.
in these scenarios, we'll now get a
ActiveRecord::RecordNotUnique ... PG::UniqueViolation: ERROR: duplicate key value ...
error instead ofActiveRecord::RecordInvalid ... Validation failed: Login must be unique
fixes bugsnag 656e06f8feff8200073ef0cd