<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <changeset id="CDAM-1805_remove_bad_lsr:1" author="rpapat" run-always="true">
        <cypherquery>
            <![CDATA[
                MATCH (p:Product:Orchard)
                WHERE p.upc IN ['6420114000095','6420114000323','6420114000385','6420114000897','6420114017024','6420114116673','6420114117090','7350063070810','7350063072043','7350063072425','7350063072869','7350063072876','7350063073217','7350063074290','7350063074672','7350063076768','195081367309','6420114000095','6420114000323','6420114000385','6420114000675','6420114000781','6420114000897','6420114003393','6420114017024','6420114116673','6420114117090','7350063070810','7350063072043','7350063072210','7350063072425','7350063072432','7350063072869','7350063072876','7350063073217','7350063073712','7350063074290','7350063074443','7350063074672','7350063074757','7350063075273','7350063075631','7350063075839','7350063075907','7350063076096','7350063076768','7350063076935','7350063077512','7350063077666']
                MATCH (p)--(t:Track:Orchard)-[rel:IS_PLACEMENT_OF]->(lsr:LabelSoundRecording)<-[rel1:REPRESENTS]-(gsr:GlobalSoundRecording)
                WHERE lsr.subaccountId = 0
                DELETE rel
                WITH t
                MATCH (t)-[rel1:IS_PLACEMENT_OF]-(lsr1:LabelSoundRecording)
                WHERE lsr1.subaccountId = 51746
                SET lsr1.name = t.name
                WITH lsr1
                MATCH (gsr:GlobalSoundRecording {isrc: lsr1.isrc})
                MERGE (gsr)-[:REPRESENTS]->(lsr1)
            ]]>
        </cypherquery>
    </changeset>
</changelog>
