<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <changeset id="PUB-644_publishing_profiles:1" author="jmarais" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {id: '5eb146ed-a93e-4666-bf08-1477ee984242'})
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    profileId: (increment.id-1),
                    profileType: 'PublishingProfile',
                    profileName: 'info@carbonaracollective.com',
                    roles: ['admin'],
                    uuid: apoc.create.uuid()
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
                WITH profile
                MATCH (v:Vendor {id: 82662})
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
                RETURN profile
            ]]>
        </cypherquery>
    </changeset>

    <changeset id="PUB-644_publishing_profiles:2" author="jmarais" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {id: '9c0332db-2d58-48b6-95d3-1c5671fab9d4'})
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    profileId: (increment.id-1),
                    profileType: 'PublishingProfile',
                    profileName: 'Leena Lee',
                    roles: ['admin'],
                    uuid: apoc.create.uuid()
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
                WITH profile
                MATCH (v:Vendor {id: 82084})
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
                RETURN profile
            ]]>
        </cypherquery>
    </changeset>

    <changeset id="PUB-644_publishing_profiles:3" author="jmarais" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {id: '7aa57479-64ea-49d6-90d2-f84608ab6eb8'})
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    profileId: (increment.id-1),
                    profileType: 'PublishingProfile',
                    profileName: 'Aleksey Kalnysh',
                    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>
