<commit_before><databaseChangeLog
        xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">

    <changeSet author="murygina" id="remove_duplicated_accounts">

        <preConditions>
            <tableExists tableName="Account"/>
            <columnExists tableName="Account" columnName="person_id"/>
            <columnExists tableName="Account" columnName="validFrom"/>
            <columnExists tableName="Account" columnName="validTo"/>
        </preConditions>

        <sql>
            DELETE FROM Account WHERE id IN (SELECT tmp.id FROM (SELECT account.id FROM Account account GROUP BY
            account.person_id, account.validFrom, account.validTo HAVING COUNT(1) > 1) as tmp)
        </sql>

    </changeSet>

</databaseChangeLog><commit_msg>Fix duplicate accounts migration for mysql releases since 5.7.5 (#268)<commit_after><databaseChangeLog
        xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">

    <changeSet author="murygina" id="remove_duplicated_accounts">
        <validCheckSum>7:32910bb107c7a38c51742bb7a75fb15d</validCheckSum>
        <preConditions>
            <tableExists tableName="Account"/>
            <columnExists tableName="Account" columnName="person_id"/>
            <columnExists tableName="Account" columnName="validFrom"/>
            <columnExists tableName="Account" columnName="validTo"/>
        </preConditions>


        <sql>
            DELETE FROM Account WHERE id IN (SELECT tmp.id FROM (SELECT MIN(account.id) id FROM Account account GROUP BY
            account.person_id, account.validFrom, account.validTo HAVING COUNT(1) > 1) as tmp)
        </sql>

    </changeSet>

</databaseChangeLog>
{'fraction_non_alphanumeric': 0.12603406326034064, 'fraction_numerical': 0.02238442822384428, 'mean_word_length': 3.1703853955375254, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 10}, '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': '5631807', 'n_tokens_mistral': 672, 'n_tokens_neox': 617, 'n_words': 108}