<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <changeset id="PUB-681_access_request:1" author="jmarais" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {id: '98b24440-359a-44c5-8d16-516be054afa1'})
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    profileId: (increment.id-1),
                    profileType: 'PublishingProfile',
                    profileName: 'distribution-team@lifestyle-label.com',
                    roles: ['admin'],
                    uuid: apoc.create.uuid()
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
                WITH profile
                MATCH (v:Vendor {id: 35547})
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
                RETURN profile
            ]]>
        </cypherquery>
    </changeset>

    <changeset id="PUB-681_access_request:2" author="jmarais" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {id: '970fe0fa-f7bc-4070-a161-99005992688a'})
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    profileId: (increment.id-1),
                    profileType: 'PublishingProfile',
                    profileName: 'sava15052006@mail.ru',
                    roles: ['admin'],
                    uuid: apoc.create.uuid()
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
                WITH profile
                MATCH (v:Vendor {id: 35547})
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
                RETURN profile
            ]]>
        </cypherquery>
    </changeset>
</changelog>
