<commit_before>/* Create a table with all usernames that have duplicates in lowercase. */
CREATE TEMPORARY TABLE `duplicate_usernames`
    SELECT LOWER(`username`) AS `username` FROM `users`
        GROUP BY LOWER(`username`) HAVING COUNT(*) > 1;
/* Update the username for all users in that table that have a username and lowercase username not being equal. */
UPDATE `users`
    SET `username`=CONCAT('anonymous-', MD5(RAND()), 32)
    WHERE LOWER(`username`) != `username`
    AND LOWER(`username`) IN (SELECT `username` FROM `duplicate_usernames`);
/* Alter users, removing the utf8mb4_bin collation now that duplicates should be gone. */
ALTER TABLE `users` CHANGE COLUMN `username` `username` VARCHAR (255) NOT NULL;<commit_msg>Cancel migration 1212 as it's taking too long in stage.<commit_after>
{'fraction_non_alphanumeric': 0.10834371108343711, 'fraction_numerical': 0.0161892901618929, 'mean_word_length': 4.868613138686132, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7485121', 'n_tokens_mistral': 247, 'n_tokens_neox': 227, 'n_words': 95}