<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://www.liquigraph.org/schema/1.0/liquigraph.xsd">
    <changeset id="DS-4023_remove_unnecessary_relations:1" author="oefanova" run-on-change="true">
        <query>
            <![CDATA[
                // Remove relations between gsr with video and video asset
                // if gsr.isrc <> video_asset.isrc
                MATCH (gsr:GlobalSoundRecording)-[rs:REPRESENTS]-(as:YoutubeAsset)-[:APPEARS_IN_VIDEO]->(this:Video:YouTube)<-[:IS]-(av:YoutubeAsset)<-[rv:REPRESENTS]-(gsr:GlobalSoundRecording)-[represents:REPRESENTS_VIDEO]->(this)
                WHERE av.isrc <> gsr.isrc
                DELETE rv, represents;
            ]]>
        </query>
    </changeset>
</changelog>
