If you are even thinking about doing this I have two big key phrases
Here is what you should do
- Install MySQL on a DevServer
- mysqldump the database and load it on the DevServer
- Point your Drupal App at the DevServer and bang on it, and kick the tires
Once you got a good dev environment, now do this on the DevServer
SELECT mail,COUNT(1) MailCount FROM users
GROUP BY mail HAVING COUNT(1) > 1;
If you get any rows coming back, there are multiple users using the same
If nothing comes back, you can proceed as follows:
CREATE TABLE users_new LIKE users;
ALTER TABLE users_new DROP INDEX `name`;
ALTER TABLE users_new DROP INDEX `mail`;
ALTER TABLE users_new ADD INDEX `name`;
ALTER TABLE users_new ADD UNIQUE INDEX `mail`;
INSERT INTO users_new SELECT * FROM users;
SELECT COUNT(1) UsersCount FROM users;
SELECT COUNT(1) UsersNewCount FROM users_new;
UsersNewCount, CONGRATULATIONS, you can continue.
ALTER TABLE users RENAME users_old;
ALTER TABLE users_new RENAME users;
users_old if you are sure you no longer need.
Give it a Try !!!