<?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="Add resource access to Label Profile for dcelotti@theorchard.com:1" author="jyang">
        <query>
            MATCH (r:Vendor) WHERE r.uuid = "be4ab272-2cdb-4016-bce6-c43b7f8b2ce9"
            WITH r
            MATCH (i:Identity {id: "02f3fd86-17e6-4555-8f4e-86d7b747cace"})-[:HAS_PROFILE]->
                (p:Profile {profileType: 'LabelProfile', profileId: 41040})
            MERGE (p)-[newrel:HAS_ACCESS_TO]->(r)
            SET newrel.updatedOn = datetime(), newrel.updatedBy = "56630637-55da-4bce-b378-8e5025080676"
            WITH p, r
            OPTIONAL MATCH (p)-[rel:DELETED_HAS_ACCESS_TO]->(r) DELETE rel
            RETURN p as profile, r.id as resources
        </query>
    </changeset>
</changelog>
