<?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="ACC-6344_grant_abacus_profile:1" author="aajay">
        <query>
            MATCH (i:Identity)
            WHERE i.id = '80d27fee-f2e5-4c2c-a957-bc1e834e4032'
            MERGE (increment:IncrementId {nodeName: 'Profile'})
            ON CREATE SET increment.id = 2
            ON MATCH SET increment.id = increment.id + 1
            CREATE (p:Profile {
            profileId: (increment.id-1),
            profileType: 'AbacusProfile',
            profileName: i.name,
            uuid: apoc.create.uuid(),
            roles: ['administrator'],
            fullCatalogAccess: true,
            brand: 'orchard',
            createdAt: datetime(),
            lastModifiedAt: datetime(),
            createdBy: 'database/ACC-6344_grant_abacus_profile:1',
            lastModifiedBy: 'database/ACC-6344_grant_abacus_profile:1'
            })
            MERGE (i)-[:HAS_PROFILE]->(p)
            RETURN i,p;
        </query>
    </changeset>
</changelog>