<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                   xmlns:neo4j="http://www.liquibase.org/xml/ns/dbchangelog-ext"
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
    <changeSet id="FS-4663_sme_france_onboarding:1" author="ozhovnuvatyi">
        <neo4j:cypher>
            <![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: 'Jeremy Govciyan',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4663'
                })
                WITH profile
                MATCH (v1:Vendor {id: 34562 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile
                CREATE (identity:Identity{
                    email: 'jeremy.govciyan@sonymusic.com',
                    firstName: 'Jeremy',
                    lastName: 'Govciyan',
                    name: 'Jeremy Govciyan',
                    id:apoc.create.uuid(),
                    active: 'Y',
                    createdAt: datetime(),
                    defaultBrand: 'sme',
                    localization: 'en',
                    numberFormat: 'us',
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    userTypes: ['label']
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
    <changeSet id="FS-4663_sme_france_onboarding:2" author="ozhovnuvatyi">
        <neo4j:cypher>
            <![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: 'Pierre Tritant',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4663'
                })
                WITH profile
                MATCH (i:Identity {id: 'd64a2069-610b-4251-85d5-f2c3d86b66ca' }),
                    (v1:Vendor {id: 34562 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile,i
                MERGE (i)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
    <changeSet id="FS-4663_sme_france_onboarding:3" author="ozhovnuvatyi">
        <neo4j:cypher>
            <![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: 'Elena Stanislave',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4663'
                })
                WITH profile
                MATCH (v1:Vendor {id: 34562 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile
                CREATE (identity:Identity{
                    email: 'elena.stanislave@sonymusic.com',
                    firstName: 'Elena',
                    lastName: 'Stanislave',
                    name: 'Elena Stanislave',
                    id:apoc.create.uuid(),
                    active: 'Y',
                    createdAt: datetime(),
                    defaultBrand: 'sme',
                    localization: 'en',
                    numberFormat: 'us',
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    userTypes: ['label']
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
    <changeSet id="FS-4663_sme_france_onboarding:4" author="ozhovnuvatyi">
        <neo4j:cypher>
            <![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: 'Jianning Yin',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4663'
                })
                WITH profile
                MATCH (v1:Vendor {id: 34562 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile
                CREATE (identity:Identity{
                    email: 'jianning.yin@sonymusic.com',
                    firstName: 'Jianning',
                    lastName: 'Yin',
                    name: 'Jianning Yin',
                    id:apoc.create.uuid(),
                    active: 'Y',
                    createdAt: datetime(),
                    defaultBrand: 'sme',
                    localization: 'en',
                    numberFormat: 'us',
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    userTypes: ['label']
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
    <changeSet id="FS-4663_sme_france_onboarding:5" author="ozhovnuvatyi">
        <neo4j:cypher>
            <![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: 'Elouan Dombis',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4663'
                })
                WITH profile
                MATCH (v1:Vendor {id: 34562 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile
                CREATE (identity:Identity{
                    email: 'elouan.dombis@sonymusic.com',
                    firstName: 'Elouan',
                    lastName: 'Dombis',
                    name: 'Elouan Dombis',
                    id:apoc.create.uuid(),
                    active: 'Y',
                    createdAt: datetime(),
                    defaultBrand: 'sme',
                    localization: 'en',
                    numberFormat: 'us',
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4663',
                    userTypes: ['label']
                })
                MERGE (identity)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
</databaseChangeLog>
