Drop the aliases table
The aliases table was completely abstracted by the phone
attribute on the accounts object.
Two Flexisip related queries will be affected by this change.
soci-users-with-phones-request=
(SELECT username, domain, ''
FROM accounts
WHERE
(activated = "1" AND username IN (:phones))
) UNION (SELECT ac.username, ac.domain, al.alias
FROM accounts ac, aliases al
WHERE (activated = "1" AND ac.id = al.account_id AND alias in (:phones))
);
soci-user-with-phone-request=
SELECT username
FROM accounts
WHERE activated = "1" AND (username = :phone OR id=(SELECT account_id FROM aliases WHERE alias = :phone));