<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <changeset id="PUB-1116_content_profiles:1" author="yostapyuk">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {id: "af895e59-fa45-484e-999d-80094675a5cd"})
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON CREATE SET increment.id = 2
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    profileId: (increment.id-1),
                    profileType: 'ContentProfile',
                    profileName: 'Hiram Wilson',
                    uuid: apoc.create.uuid(),
                    roles: ['publishing_compositions_changelog'],
                    fullCatalogAccess: true
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
                WITH profile
                MATCH (v:Vendor {id: '*'})
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
            ]]>
        </cypherquery>
    </changeset>

    <changeset id="PUB-1116_content_profiles:2" author="yostapyuk">
        <cypherquery>
            <![CDATA[
                match (p:Profile {uuid: "d3b7744c-5dec-4955-a269-c9a5830bc9df"})
                SET p.roles = p.roles + "publishing_compositions_changelog"
                return p
            ]]>
        </cypherquery>
    </changeset>
</changelog>
