<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <changeset id="NR-1352_unlink_contributors:1" author="rshield" run-always="true">
        <cypherquery>
          <![CDATA[          
            MATCH (c:NrContributor {id: "1762f5d6-4cdb-4859-8aa3-d0b369845151"})<-[rel_old:HAS_NR_CONTRIBUTOR]-(:Vendor)
            WITH c, rel_old
            MATCH (v_new:Vendor {id:  75460})
            DETACH DELETE rel_old
            MERGE (v_new)-[rel_new:HAS_NR_CONTRIBUTOR]->(c)
            ON CREATE SET
                rel_new.createdAt = datetime(),
                rel_new.lastModifiedAt = datetime(),
                rel_new.lastModifiedBy = 'database/NR-1352_unlink_contributors'
            ON MATCH SET
                rel_new.lastModifiedAt = datetime(),
                rel_new.lastModifiedBy = 'database/NR-1352_unlink_contributors'
             return v_new.id
             
          ]]>
        </cypherquery>
    </changeset>

    <changeset id="NR-1352_unlink_contributors:2" author="rshield" run-always="true">
        <cypherquery>
          <![CDATA[          
            MATCH (c:NrContributor {id: "66bf8296-c23f-4ad5-a457-9a8a6c937cc0"})<-[rel_old:HAS_NR_CONTRIBUTOR]-(:Vendor)
            WITH c, rel_old
            MATCH (v_new:Vendor {id:  75461})
            DETACH DELETE rel_old
            MERGE (v_new)-[rel_new:HAS_NR_CONTRIBUTOR]->(c)
            ON CREATE SET
                rel_new.createdAt = datetime(),
                rel_new.lastModifiedAt = datetime(),
                rel_new.lastModifiedBy = 'database/NR-1352_unlink_contributors'
            ON MATCH SET
                rel_new.lastModifiedAt = datetime(),
                rel_new.lastModifiedBy = 'database/NR-1352_unlink_contributors'
             return v_new.id
          ]]>
        </cypherquery>
    </changeset>
</changelog>
