<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./schema.xsd">
    <changeset id="PLATFORM-3554_fix_users_without_access:1" author="tnozhkina" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (i:Identity)-[:HAS_PROFILE]->(p:Profile {profileType: "SettingsProfile"})
                WHERE i.id IN [
                '2c091d5b-98db-4807-877f-3d8c23dc2d94','51ff5cdc-8353-439a-b87f-807bf902aa2f',
                'f6e39c6a-867a-4f0b-a15f-971483113cf6','bc905bb7-389c-433b-ad3f-523ccd9d2650',
                '2c1d242f-add1-4ee2-99cb-83a199879f08','7a4960e1-027a-4171-a0f5-3dfc9aae8fdc'
                ]
                SET i.active = 'N'
                WITH i,p
                MATCH (i)-[:HAS_PROFILE]->(p1:Profile {profileType: "LabelProfile"})-[:DELETED_HAS_ACCESS_TO]->(l:Label)
                MERGE (p)-[:DELETED_HAS_ADMIN_ACCESS_TO]->(l);
             ]]>
        </cypherquery>
    </changeset>
</changelog>
