<?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="TAP-1010_create_lambda_abacus_user:1" author="amerkulov" run-on-change="true">
        <query>
            MERGE (increment:IncrementId {nodeName: 'Profile'})
                ON CREATE SET increment.id = 2
                ON MATCH SET increment.id = increment.id + 1
            CREATE (profile:Profile {
                profileId: (increment.id-1),
                profileType: 'AbacusProfile',
                profileName: 'lambda-documents-generate-payments',
                roles: ['administrator'],
                fullCatalogAccess: true,
                uuid: apoc.create.uuid()
            })
            WITH profile
            CREATE (identity:Identity {
                email: 'admin+lambda-documents-generate-payments@theorchard.com',
                id: apoc.create.uuid(),
                name: 'lambda-documents-generate-payments'
            })
            CREATE (identity)-[:HAS_PROFILE]->(profile)
        </query>
    </changeset>
</changelog>

