<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <changeset id="SR-265_add_content_profiles:1" author="gaguirre" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {email: 'stiwari@theorchard.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: ['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>
    <changeset id="SR-265_add_content_profiles:2" author="gaguirre" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {email: 'acubas@theorchard.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: ['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>
    <changeset id="SR-265_add_content_profiles:3" author="gaguirre" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {email: 'aestrella@theorchard.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: ['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>
    <changeset id="SR-265_add_content_profiles:4" author="gaguirre" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {email: 'nlister@theorchard.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: ['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>
    <changeset id="SR-265_add_content_profiles:5" author="gaguirre" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (identity:Identity {email: 'nhall@theorchard.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: ['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>
