<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./schema.xsd">
    <changeset id="PLATFORM-3849_backfill_vendors_to_premium_service:1" author="tnozhkina" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (v:Vendor)-[rel:IN_SERVICE_TIER]->(s:ServiceTier)
                WHERE v.vendorId IN [
                68794, 67652, 68914, 68745, 68838, 67154,
                68893, 69079, 68772, 73109, 67281, 67689,
                66982, 68988, 67697, 69016, 72372, 67613,
                67650, 77054, 75983, 74204, 68133, 67661,
                67061, 68093, 67329, 68851, 67943, 67976,
                68860, 73108, 67906, 68810, 67732, 68909,
                67706, 68843, 68737, 68632, 75806, 68632,
                67763, 67004, 68486, 68782, 68782, 68620,
                75846, 68782, 73114, 68538, 69122, 68086,
                68917, 67778, 68502
                ]
                DELETE rel
                RETURN v,s
            ]]>
        </cypherquery>
    </changeset>
    <changeset id="PLATFORM-3849_backfill_vendors_to_premium_service:2" author="tnozhkina" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (v:Vendor), (s:ServiceTier)
                WHERE v.vendorId IN [
                68794, 67652, 68914, 68745, 68838, 67154,
                68893, 69079, 68772, 73109, 67281, 67689,
                66982, 68988, 67697, 69016, 72372, 67613,
                67650, 77054, 75983, 74204, 68133, 67661,
                67061, 68093, 67329, 68851, 67943, 67976,
                68860, 73108, 67906, 68810, 67732, 68909,
                67706, 68843, 68737, 68632, 75806, 68632,
                67763, 67004, 68486, 68782, 68782, 68620,
                75846, 68782, 73114, 68538, 69122, 68086,
                68917, 67778, 68502
                ]
                AND s.name = 'premium-services'
                MERGE (v)-[rel:IN_SERVICE_TIER]->(s)
                    ON CREATE SET rel.createdAt = datetime(), rel.createdBy = 'PLATFORM-3849'
                RETURN v,s
            ]]>
        </cypherquery>
    </changeset>
</changelog>
