<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <changeset id="PUB-635_publishing_profiles:1" author="yostapyuk" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {id: '887ade2e-9fc8-4d28-a11c-2177e6f1bf52'})
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    profileId: (increment.id-1),
                    profileType: 'PublishingProfile',
                    profileName: 'Paul Tavers',
                    roles: ['admin'],
                    uuid: apoc.create.uuid()
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
                WITH profile
                MATCH (v:Vendor {id: 35931})
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
                RETURN profile
            ]]>
        </cypherquery>
    </changeset>

    <changeset id="PUB-635_publishing_profiles:2" author="yostapyuk" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {id: '8b23269d-a171-49f8-930f-a46024e67e42'})
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    profileId: (increment.id-1),
                    profileType: 'PublishingProfile',
                    profileName: 'Dayna Travers',
                    roles: ['admin'],
                    uuid: apoc.create.uuid()
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
                WITH profile
                MATCH (v:Vendor {id: 35931})
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
                RETURN profile
            ]]>
        </cypherquery>
    </changeset>
</changelog>
