<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://www.liquigraph.org/schema/1.0/liquigraph.xsd">
    <changeset id="AS-NOTICKET-test_profile_merge:1" author="jbrooks" run-on-change="true">
        <query>
            <![CDATA[
                match (i:Identity {email: 'jbrooks@theorchard.com'})-[:HAS_PROFILE]->(p:Profile{profileType: 'CollaboratorsProfile'})
                with i, count(p) as profileCount, collect(p) as profiles
                where profileCount > 1
                call apoc.refactor.mergeNodes(profiles, {properties: 'discard', mergeRels: true })
                yield node
                return 0
            ]]>
        </query>
    </changeset>
</changelog>
