<commit_before><?xml version="1.0" encoding="UTF-8"?>
<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.4.xsd"
  logicalFilePath="changelog-3.7">

  <changeSet author="author" id="changelog-3.7">

    <update tableName="devices">
      <column name="groupid"/>
      <where>groupid NOT IN (SELECT id FROM groups)</where>
    </update>

    <addForeignKeyConstraint baseColumnNames="groupid" baseTableName="devices" constraintName="fk_device_group_groupid" onDelete="SET NULL" onUpdate="RESTRICT" referencedColumnNames="id" referencedTableName="groups"/>

    <update tableName="groups">
      <column name="groupid"/>
      <where>groupid NOT IN (SELECT id FROM (SELECT id FROM groups) AS groups_1)</where>
    </update>

  </changeSet>

  <changeSet author="author" id="changelog-3.7-notmssql">

    <preConditions onFail="CONTINUE"><commit_msg>Set MARK_RAN and name for intermediate table<commit_after><?xml version="1.0" encoding="UTF-8"?>
<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.4.xsd"
  logicalFilePath="changelog-3.7">

  <changeSet author="author" id="changelog-3.7">

    <update tableName="devices">
      <column name="groupid"/>
      <where>groupid NOT IN (SELECT id FROM groups)</where>
    </update>

    <addForeignKeyConstraint baseColumnNames="groupid" baseTableName="devices" constraintName="fk_device_group_groupid" onDelete="SET NULL" onUpdate="RESTRICT" referencedColumnNames="id" referencedTableName="groups"/>

    <update tableName="groups">
      <column name="groupid"/>
      <where>groupid NOT IN (SELECT id FROM (SELECT id FROM groups) AS groups_ids)</where>
    </update>

  </changeSet>

  <changeSet author="author" id="changelog-3.7-notmssql">

    <preConditions onFail="MARK_RAN">
{'fraction_non_alphanumeric': 0.15264367816091953, 'fraction_numerical': 0.015172413793103448, 'mean_word_length': 4.4811083123425695, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 2, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 12}, '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': '3916198', 'n_tokens_mistral': 753, 'n_tokens_neox': 713, 'n_words': 117}