<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <changeset id="PUB-648_publishing_profiles:1" author="jmarais">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {id: "48a1fa99-3c14-4aa6-a730-e2f8cfe4459d" })
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    profileId: (increment.id-1),
                    profileType: 'PublishingProfile',
                    profileName: 'medallamusica@gmail.com',
                    roles: ['admin'],
                    uuid: apoc.create.uuid()
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
                WITH profile
                MATCH (v:Vendor {id: 71306})
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
                RETURN profile
            ]]>
        </cypherquery>
    </changeset>

        <changeset id="PUB-648_publishing_profiles:2" author="jmarais">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {id: "3f78ff8e-db0e-40c6-b0cd-551a01303c9a" })
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    profileId: (increment.id-1),
                    profileType: 'PublishingProfile',
                    profileName: 'Jayden Henry PublishingProfile',
                    roles: ['admin'],
                    uuid: apoc.create.uuid()
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
                WITH profile
                MATCH (v:Vendor {id: 82798})
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
                RETURN profile
            ]]>
        </cypherquery>
    </changeset>
</changelog>
