<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.liquigraph.org/schema/1.0/liquigraph.xsd">
    <changeset id="ARTARCH-232_update_participants_model:1" author="savva" run-on-change="true">
        <query>
            CALL apoc.periodic.iterate(
                "
                    MATCH (lp:LabelParticipant) RETURN lp
                ",
                "
                    SET lp :Orchard
                ",
                {batchSize: 1000, parallel: true}
            );
        </query>
    </changeset>
    <changeset id="ARTARCH-232_update_participants_model:2" author="savva" run-on-change="true">
        <query>
            CALL apoc.periodic.iterate(
                "
                    MATCH (p:Product) RETURN p
                ",
                "
                    SET p :Orchard
                ",
                {batchSize: 1000, parallel: true}
            );
        </query>
    </changeset>
    <changeset id="ARTARCH-232_update_participants_model:3" author="savva" run-on-change="true">
        <query>
            CALL apoc.periodic.iterate(
                "
                    MATCH (t:Track) RETURN t
                ",
                "
                    SET t :Orchard
                ",
                {batchSize: 1000, parallel: true}
            );
        </query>
    </changeset>
    <changeset id="ARTARCH-232_update_participants_model:4" author="savva" run-on-change="true">
        <query>
            CALL apoc.periodic.iterate(
                "
                      MATCH (p:Product)-[r:HAS_PARTICIPANT]-(lp:LabelParticipant) RETURN r
                ",
                "
                      DELETE r
                ",
                {batchSize: 1000}
            );
        </query>
    </changeset>
    <changeset id="ARTARCH-232_update_participants_model:5" author="savva" run-on-change="true">
        <query>
            CALL apoc.periodic.iterate(
                "
                    MATCH (t:Track:Orchard)-[r:HAS_PARTICIPANT]-(lp:LabelParticipant) RETURN r
                ",
                "
                    DELETE r
                ",
                {batchSize: 1000}
            );
        </query>
    </changeset>
    <changeset id="ARTARCH-232_update_participants_model:6" author="savva" run-on-change="true">
        <query>
            CALL apoc.periodic.iterate(
                "
                    MATCH (lp:LabelParticipant)-[r:CREATED_FROM]-(p:Product) RETURN r
                ",
                "
                    DELETE r
                ",
                {batchSize: 1000}
            );
        </query>
    </changeset>
</changelog>
