<commit_before>BEGIN;
    CREATE TYPE participant_number AS ENUM ('singular', 'plural');

    ALTER TABLE participants ADD COLUMN number participant_number
        NOT NULL DEFAULT 'singular';
    ALTER TABLE log_participant_type ADD COLUMN number participant_number
        NOT NULL DEFAULT 'singular';

    UPDATE participants SET number='plural' WHERE type='group';
    UPDATE log_participant_type SET number='plural' WHERE type='group';

    DROP RULE log_participant_type ON participants;

    ALTER TABLE participants DROP COLUMN type;
    -- ALTER TABLE participants RENAME COLUMN type_ TO type;
    ALTER TABLE log_participant_type DROP COLUMN type;
    -- ALTER TABLE log_participant_type RENAME COLUMN type_ TO type;

    ALTER TABLE log_participant_type RENAME TO log_participant_number;

    CREATE RULE log_participant_number
    AS ON UPDATE TO participants
              WHERE NEW.number <> OLD.number
                 DO
        INSERT INTO log_participant_number
                    (ctime, participant, number)
             VALUES ( COALESCE (( SELECT ctime
                                    FROM log_participant_number
                                   WHERE participant=OLD.username
                                   LIMIT 1
                                 ), CURRENT_TIMESTAMP)
                    , OLD.username
                    , NEW.number
                     );
END;<commit_msg>removing commented out SQL statements<commit_after>BEGIN;
    CREATE TYPE participant_number AS ENUM ('singular', 'plural');

    ALTER TABLE participants ADD COLUMN number participant_number
        NOT NULL DEFAULT 'singular';
    ALTER TABLE log_participant_type ADD COLUMN number participant_number
        NOT NULL DEFAULT 'singular';

    UPDATE participants SET number='plural' WHERE type='group';
    UPDATE log_participant_type SET number='plural' WHERE type='group';

    DROP RULE log_participant_type ON participants;

    ALTER TABLE participants DROP COLUMN type;
    ALTER TABLE log_participant_type DROP COLUMN type;

    ALTER TABLE log_participant_type RENAME TO log_participant_number;

    CREATE RULE log_participant_number
    AS ON UPDATE TO participants
              WHERE NEW.number <> OLD.number
                 DO
        INSERT INTO log_participant_number
                    (ctime, participant, number)
             VALUES ( COALESCE (( SELECT ctime
                                    FROM log_participant_number
                                   WHERE participant=OLD.username
                                   LIMIT 1
                                 ), CURRENT_TIMESTAMP)
                    , OLD.username
                    , NEW.number
                     );
END;
{'fraction_non_alphanumeric': 0.04562178072111847, 'fraction_numerical': 0.0007358351729212656, 'mean_word_length': 1.9331175836030206, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2294098', 'n_tokens_mistral': 720, 'n_tokens_neox': 639, 'n_words': 213}