删除数据库字段一样的row, 并增加唯一索引
DELETE FROM `groups` WHERE name IN (select a.name from ( SELECT name FROM `groups` GROUP BY name HAVING count(name) > 1 ) a);
alter table `groups` add UNIQUE KEY `name` (`name`);
DELETE FROM `groups` WHERE name IN (select a.name from ( SELECT name FROM `groups` GROUP BY name HAVING count(name) > 1 ) a);
alter table `groups` add UNIQUE KEY `name` (`name`);