<?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-3869_update_insanity_users: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: 'Alice Beal',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-3869',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-3869'
                })
                WITH profile
                MATCH (i:Identity {id: '885d9236-0c09-4e0d-abe2-6c02ecd01401'}),
                      (v:Vendor {id: 790795 })
                SET
                    i.email= 'ab@insanity.com',
                    i.firstName= 'Alice',
                    i.lastName= 'Beal',
                    i.name= 'Alice Beal',
                    i.createdAt= datetime(),
                    i.defaultBrand= 'sme',
                    i.localization= 'en',
                    i.numberFormat= 'us',
                    i.createdBy= 'https://theorchard.atlassian.net/browse/FS-3869',
                    i.updatedBy= 'https://theorchard.atlassian.net/browse/FS-3869',
                    i.userTypes= ['label']
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
                WITH profile,i
                MERGE(i)-[:HAS_PROFILE]->(profile)
            ]]>
        </query>
    </changeset>
    <changeset id="FS-3869_update_insanity_users:2" 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: 'Emma Seccombe',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-3869',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-3869'
                })
                WITH profile
                MATCH (i:Identity {id: '1f446749-04f2-4d4c-b8ab-2aedd2d83110'}),
                      (v:Vendor {id: 790795 })
                SET
                    i.email= 'es@insanity.com',
                    i.firstName= 'Emma',
                    i.lastName= 'Seccombe',
                    i.name= 'Emma Seccombe',
                    i.createdAt= datetime(),
                    i.defaultBrand= 'sme',
                    i.localization= 'en',
                    i.numberFormat= 'us',
                    i.createdBy= 'https://theorchard.atlassian.net/browse/FS-3869',
                    i.updatedBy= 'https://theorchard.atlassian.net/browse/FS-3869',
                    i.userTypes= ['label']
                MERGE (profile)-[:HAS_ACCESS_TO]->(v)
                WITH profile,i
                MERGE(i)-[:HAS_PROFILE]->(profile)
            ]]>
        </query>
    </changeset>
</changelog>
