<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <changeset id="SR-273_add_content_profile:1" author="nlittmann" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {email: 'bshah@sonymusic-pde.com'})
                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: identity.name,
                    brand: identity.defaultBrand,
                    fullCatalogAccess: true,
                    roles: ['review_digital_audio', 'view_orchard_sound_recording'],
                    uuid: apoc.create.uuid()
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
                WITH profile
                MATCH (vendor:Vendor {id: '*'})
                MERGE (profile)-[:HAS_ACCESS_TO]->(vendor)
            ]]>
        </cypherquery>
    </changeset>
</changelog>
