<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./schema.xsd">
    <changeset id="TAP-906-grant-access:1" author="j0shua" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (v:Vendor {id: '*'})

                MATCH (identity:Identity {
                    email: "elizabete.kolbjer@awal.com"
                })-[hp:HAS_PROFILE]->(p:Profile { profileType: 'DocumentsProfile' })
                SET
                    p.fullCatalogAccess = true,
                    p.updatedBy = 'database/TAP-906-grant-access',
                    p.updatedOn = datetime(),
                    p.lastModifiedAt = datetime(),
                    p.lastModifiedBy = 'database/TAP-906-grant-access'


                MERGE (p)-[hat:HAS_ACCESS_TO]->(v)
                SET
                    hat.createdAt = datetime(),
                    hat.updatedOn = datetime(),
                    hat.updatedBy = 'database/TAP-902-grant-access'

                return true;
            ]]>
        </cypherquery>
    </changeset>
</changelog>