I have a table:
table votes ( id, user, email, address, primary key(id), );
Now I want to make the columns user
If you want to avoid duplicates in future. Create another column say id2.
UPDATE tablename SET id2 = id;
Now add the unique on two columns:
alter table tablename add unique index(columnname, id2);