<?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="WAR-3348_restore_vendor_star_access:1" author="menger">
        <neo4j:cypher>
            <![CDATA[
            MATCH (identity:Identity {email: 'morgan.mckee@theorchard.com'})
                -[:HAS_PROFILE]->(profile:Profile {profileType: "MoneyhubProfile"})
                -[deleted_relationship:DELETED_HAS_ACCESS_TO]->(vendor:Vendor {id: '*'})
            DELETE deleted_relationship
            WITH profile, vendor
            MERGE (profile)-[:HAS_ACCESS_TO]->(vendor)
            ]]>
        </neo4j:cypher>
    </changeSet>
</databaseChangeLog>
