<?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="PEACE-7-add-user-jfidlow" author="jfidlow">
        <query><![CDATA[
            MATCH (identity:Identity {email: 'jfidlow@theorchard.io'})
            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: 'ContentReviewProfile',
                profileName: 'Jay F',
                roles: ['admin'],
                uuid: apoc.create.uuid()
            })
            MERGE (identity)-[:HAS_PROFILE]->(profile)
            WITH profile
            MATCH (globalVendor:Vendor { id: '*' })
            MERGE (profile)-[:HAS_ACCESS_TO]->(globalVendor);
        ]]></query>
    </changeset>
    <changeset id="PEACE-7-setup-content-review-user" author="jfidlow">
        <query><![CDATA[
            MATCH (identity:Identity {email: 'piannone@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: 'ContentReviewProfile',
                profileName: 'Peter I',
                roles: ['admin'],
                uuid: apoc.create.uuid()
            })
            MERGE (identity)-[:HAS_PROFILE]->(profile)
            WITH profile
            MATCH (globalVendor:Vendor { id: '*' })
            MERGE (profile)-[:HAS_ACCESS_TO]->(globalVendor);
        ]]></query>
    </changeset>
</changelog>
