<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.liquigraph.org/schema/1.0/liquigraph.xsd">
    <changeset id="PUB-00_create_publishing_profiles:1" author="ratoui">
        <query>
          MATCH (identity:Identity {email: 'ryan.smith@bfmg.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: 'PublishingProfile',
                profileName: 'PublishingProfile',
                roles: ['admin'],
                uuid: apoc.create.uuid()
            })
            MERGE (identity)-[:HAS_PROFILE]->(profile)
            WITH profile
            MATCH (v:Vendor {id: 34865})
            MERGE (profile)-[:HAS_ACCESS_TO]->(v)
        </query>
    </changeset>

    <changeset id="PUB-00_create_publishing_profiles:2" author="ratoui">
        <query>
          MATCH (identity:Identity {email: 'hayley.beals@bfmg.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: 'PublishingProfile',
                profileName: 'PublishingProfile',
                roles: ['admin'],
                uuid: apoc.create.uuid()
            })
            MERGE (identity)-[:HAS_PROFILE]->(profile)
            WITH profile
            MATCH (v:Vendor {id: 34865})
            MERGE (profile)-[:HAS_ACCESS_TO]->(v)            
        </query>
    </changeset>

    <changeset id="PUB-00_create_publishing_profiles:3" author="ratoui">
        <query>
          MATCH (identity:Identity {email: 'mike.mccloskey@bfmg.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: 'PublishingProfile',
                profileName: 'PublishingProfile',
                roles: ['admin'],
                uuid: apoc.create.uuid()
            })
            MERGE (identity)-[:HAS_PROFILE]->(profile)
            WITH profile
            MATCH (v:Vendor {id: 34865})
            MERGE (profile)-[:HAS_ACCESS_TO]->(v)            
        </query>
    </changeset>
</changelog>
