<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <changeset id="SR-239_grant_manage_digital_audio_role:1" author="gaguirre" run-on-change="true">
        <cypherquery>
            <![CDATA[
                WITH [
                    'gaguirre@sonymusic-pde.com',
                    'ccapalbo@sonymusic-pde.com',
                    'fholland@sonymusic-pde.com',
                    'nils.littmann@sonymusic-pde.com',
                    'rshield@sonymusic-pde.com',
                    'ajaiswal@sonymusic-pde.com',
                    'pdumoulin@sonymusic-pde.com'
                ] AS emails
                UNWIND range(0, size(emails) - 1) AS i
                WITH i, emails[i] AS email
                MATCH (identity:Identity {email: email})--(profile:Profile {profileType: 'ContentProfile'})
                SET
                    profile.roles = profile.roles + 'manage_digital_audio'
            ]]>
        </cypherquery>
    </changeset>
    <changeset id="SR-239_grant_manage_digital_audio_role:2" author="gaguirre" run-on-change="true">
        <cypherquery>
            <![CDATA[
                MATCH(goodProfile:Profile {uuid: '2d0095da-8c72-4e89-9280-bd7444534810'})
                SET
                    goodProfile.roles = ['review_digital_audio','view_orchard_sound_recording','create_bundle','manage_nr_repertoire','manage_digital_audio']
                WITH goodProfile
                MATCH(badProfile:Profile {uuid: 'b307d8a6-22d4-4a1a-91a3-fd5216f423e9'})
                DETACH DELETE badProfile
            ]]>
        </cypherquery>
    </changeset>
</changelog>
