--- users-email-index

drop index users.users_email_uniq;
alter table users add email_lower as lower(email);

create unique index users_email_uniq
on users(email_lower)
where
    deleted = 0
    and email is not null
    and email != ''
;
