<?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="PUB-616-assign-writer-to-ascap-orch:2" author="ratoui">
        <query>
            <![CDATA[
                MATCH(v:Vendor {id: 24483})
                CREATE(p:PublishingPublisher {
                    name: 'Orchard Publishing Services', 
                    pubPublisherID : 1, 
                    pro: 'ASCAP', 
                    ipi: '01012785386', 
                    id: apoc.create.uuid(),
                    createdAt: datetime(),
                    lastModifiedAt: datetime(),
                    createdBy: 'pub-616-db-pr/11e259e5-5b61-48a6-b38b-2dd348ca4156',
                    lastModifiedBy:'pub-616-db-pr/11e259e5-5b61-48a6-b38b-2dd348ca4156'
                })
                CREATE (v)-[:HAS_ASSOCIATED_PUBLISHER]->(p)
                WITH p
                MATCH (a:PublishingAgreement {id: 'c4532549-0c86-4801-a8db-aa8b159f85bb'})<-[ha:HAS_AGREEMENT]-(:PublishingPublisher {id: 'a1f23ec0-ed06-46c5-b37d-2ed98e390e05'})
                DETACH DELETE ha
                CREATE (a)<-[h:HAS_AGREEMENT]-(p)
            ]]>
        </query>
    </changeset>
</changelog>
