<?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="FS-3958_john_shoup_fansifter_access:1" author="ozhovnuvatyi">
        <query>
            <![CDATA[
                MERGE (increment:IncrementId {nodeName: 'Profile'})
                    ON CREATE SET increment.id = 2
                    ON MATCH SET increment.id = increment.id + 1
                CREATE (profile:Profile {
                    brand: 'sme',
                    profileId: (increment.id-1),
                    profileType: 'AudienceProfile',
                    profileName: 'John Shoup',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-3958',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-3958'
                })
                WITH profile
                MATCH (i:Identity {id: '3472154c-5586-4b9e-a758-d1866edcce6b' }),
                    (v1:Vendor {id: 34536 }),
                    (v2:Vendor {id: 34514 }),
                    (v3:Vendor {id: 34519 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                MERGE (profile)-[:HAS_ACCESS_TO]->(v2)
                MERGE (profile)-[:HAS_ACCESS_TO]->(v3)
                WITH profile,i
                MERGE (i)-[:HAS_PROFILE]->(profile)
            ]]>
        </query>
    </changeset>
</changelog>
