<?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-3959_test_label_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: 'theorchard',
                    profileId: (increment.id-1),
                    profileType: 'AudienceProfile',
                    profileName: 'Aaron Neigher',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-3959',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-3959'
                })
                WITH profile
                MATCH (i:Identity {id: '1e4a634f-4f20-4756-8df7-2731831a34ec' }),
                    (v1:Vendor {id: 7123 }),
                    (v2:Vendor {id: 82477 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                MERGE (profile)-[:HAS_ACCESS_TO]->(v2)
                WITH profile,i
                MERGE (i)-[:HAS_PROFILE]->(profile)
            ]]>
        </query>
    </changeset>
    <changeset id="FS-3959_test_label_access:2" author="ozhovnuvatyi">
        <query>
            <![CDATA[
                MATCH (i:Identity {id: '36223918-07ab-43d8-aa16-b1e18c62d4c8' })-[:HAS_PROFILE]-(profile:Profile {profileType: "AudienceProfile"}),
                    (v1:Vendor {id: 7123 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
            ]]>
        </query>
    </changeset>
</changelog>
