<?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="ACC-8272_remove_users_from_abacus:1" author="mstead">
        <neo4j:cypher>
            <![CDATA[
                MATCH (i:Identity)-[rel:HAS_PROFILE]->(p:Profile {profileType: "AbacusProfile"})
                WHERE p.profileId IN [406944, 426091]
                SET rel.dateDeleted = localdatetime()
                WITH i, rel
                CALL apoc.refactor.setType(rel, 'DELETED_HAS_PROFILE')
                YIELD input, output
                RETURN i;
            ]]>
        </neo4j:cypher>
    </changeSet>
</databaseChangeLog>

