<?xml version="1.0" encoding="UTF-8"?>
<changelog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.liquigraph.org/schema/1.0/liquigraph.xsd">
    <changeset id="PUB-97-touch-nodes-missing-from-snowflake:1" author="raedorch">
        <query>
        <![CDATA[
            MATCH (sw:PublishingSongWriter)-[hs:HAS_WRITER_SHARE]-(:PublishingComposition)
            MATCH (sw)-[ha:HAS_AGREEMENT]-(:PublishingAgreement)
            MATCH (sw)-[hsw:HAS_SIGNED_WRITER]-(:Label)
            WHERE sw.createdAt < datetime({year:2021, month:03, day:26})
            SET sw.pub97Backfill = true, hs.pub97Backfill = true, ha.pub97Backfill = true, hsw.pub97Backfill = true
        ]]>
        </query>
    </changeset>
    <changeset id="PUB-97-touch-nodes-missing-from-snowflake:2" author="raedorch">
        <query>
        <![CDATA[
            MATCH (pp:PublishingPublisher)-[hp:HAS_PUB_SHARE]-(:PublishingComposition)
            MATCH (pp)-[ha:HAS_AGREEMENT]-(:PublishingAgreement)
            WHERE pp.createdAt < datetime({year:2021, month:03, day:26})
            SET pp.pub97Backfill = true, hp.pub97Backfill = true, ha.pub97Backfill = true
        ]]>
        </query>
    </changeset>
    <changeset id="PUB-97-touch-nodes-missing-from-snowflake:3" author="raedorch">
        <query>
        <![CDATA[
            MATCH (pc:PublishingComposition)-[hsr:HAS_SOUND_RECORDING]-(:GlobalSoundRecording)
            MATCH (pc)-[hc:HAS_COMPOSITION]-(:Label)
            WHERE pc.createdAt < datetime({year:2021, month:03, day:26})
            SET pc.pub97Backfill = true, hsr.pub97Backfill = true, hc.pub97Backfill = true
        ]]>
        </query>
    </changeset>
    <changeset id="PUB-97-touch-nodes-missing-from-snowflake:4" author="raedorch">
        <query>
        <![CDATA[
            MATCH (pa:PublishingAgreement) 
            WHERE pa.createdAt < datetime({year:2021, month:03, day:26})
            SET pa.pub97Backfill = true
        ]]>
        </query>
    </changeset>
</changelog> 
