<commit_before><?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
<changeSet author="krusche" id="1562320394217-1">
    <addColumn tableName="participation">
        <column name="discriminator" type="varchar(31)">
            <constraints nullable="false"/>
        </column>
    </addColumn>
</changeSet>
<changeSet author="krusche" id="1562320394217-2">
    <sql>update participation set discriminator = 'TPEP', exercise_id = null where build_plan_id like '%-BASE';</sql>
    <sql>update participation set discriminator = 'SPEP', exercise_id = null where build_plan_id like '%-SOLUTION';</sql>
    <sql>update participation set discriminator = 'PESP' where discriminator = "" and build_plan_id is not null;</sql>
    <sql>update participation set discriminator = 'SP' where discriminator = "" and build_plan_id is null;</sql>
</changeSet>
</databaseChangeLog><commit_msg>fix sql migration of participations<commit_after><?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
<changeSet author="krusche" id="1562320394217-1">
    <addColumn tableName="participation">
        <column name="discriminator" type="varchar(31)">
            <constraints nullable="false"/>
        </column>
    </addColumn>
</changeSet>
<changeSet author="krusche" id="1562320394217-2">
    <sql>update participation set discriminator = 'TPEP', exercise_id = null where build_plan_id like '%-BASE';</sql>
    <sql>update participation set discriminator = 'SPEP', exercise_id = null where build_plan_id like '%-SOLUTION';</sql>
    <sql>update participation p, exercise e set p.discriminator = 'PESP' where discriminator = "" and p.exercise_id = e.id and e.discriminator = 'P';</sql>
    <sql>update participation set discriminator = 'SP' where discriminator = ""</sql>
</changeSet>
</databaseChangeLog>
{'fraction_non_alphanumeric': 0.16048448145344435, 'fraction_numerical': 0.03028009084027252, 'mean_word_length': 5.132250580046404, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 2, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, 'xml': 20}, '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': '1465977', 'n_tokens_mistral': 960, 'n_tokens_neox': 880, 'n_words': 154}