<?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-4511_black_17_users_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: 'theorchard',
                    profileId: (increment.id-1),
                    profileType: 'AudienceProfile',
                    profileName: 'Austin Rodgers',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4511',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4511'
                })
                WITH profile
                MATCH (i:Identity {id: '698686d2-88a0-4407-8d3f-1ae9465b47f6' }),
                    (v1:Vendor {id: 25223 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile,i
                MERGE (i)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
    <changeSet id="FS-4511_black_17_users_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: 'theorchard',
                    profileId: (increment.id-1),
                    profileType: 'AudienceProfile',
                    profileName: 'Troy',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4511',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4511'
                })
                WITH profile
                MATCH (i:Identity {id: 'ad2a3210-ebec-4e34-8c30-845ca25adc81' }),
                    (v1:Vendor {id: 25223 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile,i
                MERGE (i)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
    <changeSet id="FS-4511_black_17_users_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: 'theorchard',
                    profileId: (increment.id-1),
                    profileType: 'AudienceProfile',
                    profileName: 'Paul Leger',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4511',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4511'
                })
                WITH profile
                MATCH (i:Identity {id: 'c35921fc-7eda-40c5-be04-0688a540a9ba' }),
                    (v1:Vendor {id: 25223 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile,i
                MERGE (i)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
    <changeSet id="FS-4511_black_17_users_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: 'theorchard',
                    profileId: (increment.id-1),
                    profileType: 'AudienceProfile',
                    profileName: 'Bryan Hubert',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4511',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4511'
                })
                WITH profile
                MATCH (i:Identity {id: '12c16f30-8733-4a86-8715-b54736cb7e9d' }),
                    (v1:Vendor {id: 25223 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile,i
                MERGE (i)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
    <changeSet id="FS-4511_black_17_users_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: 'theorchard',
                    profileId: (increment.id-1),
                    profileType: 'AudienceProfile',
                    profileName: 'Jake Houstle',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4511',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4511'
                })
                WITH profile
                MATCH (i:Identity {id: 'f5babd63-bfb1-4a28-a24a-17dfc5c03072' }),
                    (v1:Vendor {id: 25223 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile,i
                MERGE (i)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
    <changeSet id="FS-4511_black_17_users_onboarding:6" 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: 'theorchard',
                    profileId: (increment.id-1),
                    profileType: 'AudienceProfile',
                    profileName: 'Tyler Blatchley',
                    roles: ['audience'],
                    fullCatalogAccess: false,
                    uuid: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'https://theorchard.atlassian.net/browse/FS-4511',
                    updatedBy: 'https://theorchard.atlassian.net/browse/FS-4511'
                })
                WITH profile
                MATCH (i:Identity {id: '02792846-68b3-49d2-a7a4-ce3bbb00690e' }),
                    (v1:Vendor {id: 25223 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
                WITH profile,i
                MERGE (i)-[:HAS_PROFILE]->(profile)
            ]]>
        </neo4j:cypher>
    </changeSet>
    <changeSet id="FS-4511_black_17_users_onboarding:7" author="ozhovnuvatyi">
        <neo4j:cypher>
            <![CDATA[
                MATCH (i:Identity {id: 'a797e5cb-b639-4cb3-ae06-dd3e3ae482b1' })-[:HAS_PROFILE]-(profile:Profile {profileType: "AudienceProfile"}),
                    (v1:Vendor {id: 25223 })
                MERGE (profile)-[:HAS_ACCESS_TO]->(v1)
            ]]>
        </neo4j:cypher>
    </changeSet>
</databaseChangeLog>
