Make sure email addresses on users/contacts are unique
https://trello.com/c/355SdNHp/52-2h-email-adresses-should-be-unique
On users
we already had a UNIQUE index on (email, active)
, I didn't add one on contacts
since we don't have an active
flag there and probably want email addresses to be reusable after a contact is soft-deleted. But both models now validate the uniqueness on the model level (so ignoring the deleted records).