ALTER TABLE fos_user_user_group
ADD CONSTRAINT user_id_group_id UNIQUE (user_id,group_id);