<commit_before>ALTER TABLE api_access
    DROP FOREIGN KEY user_id_api,
    CHANGE COLUMN user_id user_id int(11) unsigned NOT NULL,
    ADD CONSTRAINT user_id_api  FOREIGN KEY (user_id) REFERENCES users (id);

ALTER TABLE oauth_token
       DROP FOREIGN KEY user_id_refs_id_e213c7fc,
       CHANGE COLUMN user_id user_id int(11) unsigned NOT NULL,
       ADD CONSTRAINT user_id_oauth_token FOREIGN KEY (user_id) REFERENCES users (id);

ALTER TABLE users
    ADD COLUMN last_login datetime DEFAULT NULL,
    DROP FOREIGN KEY user_id_refs_id_eb1f4611,
    DROP COLUMN user_id;

UPDATE users SET last_login = NOW();



<commit_msg>tweak migration<commit_after>ALTER TABLE api_access DROP FOREIGN KEY user_id_api;

ALTER TABLE api_access
    CHANGE COLUMN user_id user_id int(11) unsigned NOT NULL,
    ADD CONSTRAINT user_id_api  FOREIGN KEY (user_id) REFERENCES users (id);

ALTER TABLE oauth_token DROP FOREIGN KEY user_id_refs_id_e213c7fc;
ALTER TABLE oauth_token
       CHANGE COLUMN user_id user_id int(11) unsigned NOT NULL,
       ADD CONSTRAINT user_id_oauth_token FOREIGN KEY (user_id) REFERENCES users (id);

ALTER TABLE users
    ADD COLUMN last_login datetime DEFAULT NULL,
    DROP FOREIGN KEY user_id_refs_id_eb1f4611,
    DROP COLUMN user_id;

UPDATE users SET last_login = NOW();




{'fraction_non_alphanumeric': 0.04317656129529684, 'fraction_numerical': 0.020046260601387818, 'mean_word_length': 4.363636363636363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6176600', 'n_tokens_mistral': 489, 'n_tokens_neox': 463, 'n_words': 145}