<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:/var/app/InputFileSchema.xsd">
    <changeset id="PLATFORM-3908_fix_wrong_vendor_uuids_neo4j:1" author="rtorres" run-always="true">
        <precondition>
            <sqlquery>
                <![CDATA[
                    SELECT
                        ar_vendor_id AS VENDOR_ID,
                        ar_uuid AS VENDOR_UUID
                    FROM DEV_ENGINEERING.RTORRES.PLATFORM_3908_VENDOR_UUID_MISMATCH;
                ]]>
            </sqlquery>
        </precondition>
        <cypherquery>
            <![CDATA[
                MATCH (v:Vendor {vendorId: toInteger(event.VENDOR_ID)})
                SET
                    v.uuid = event.VENDOR_UUID,
                    v.lastModifiedAt = datetime(),
                    v.lastModifiedBy = 'database/PLATFORM-3908_fix_wrong_vendor_uuids_neo4j:1'
                ;
            ]]>
        </cypherquery>
    </changeset>
</changelog>
