<?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="DS-4850_synchronize_release_artist:1" author="ssavva" run-always="true">
        <precondition>
            <sqlquery>
                <![CDATA[
                    SELECT ID
                    FROM facts.prod.release_artist;
                ]]>
            </sqlquery>
        </precondition>
        <cypherquery>
            <![CDATA[
                OPTIONAL MATCH (n:ReleaseArtist {id: event.ID})
                FOREACH (_ in CASE WHEN n IS NULL THEN [1] ELSE [] END |
                    CREATE (n:ReleaseArtist:ToBeDeleted {id: event.ID})
                )
            ]]>
        </cypherquery>
    </changeset>
</changelog>
