<?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="ARTARCH-614_backfill_project_in_sf:1" author="savva" run-on-change="true">
        <query>
            CALL apoc.periodic.iterate(
              "
                MATCH (pr:Project)
                RETURN pr
              ",
              "
                SET
                  pr.lastModifiedAt =
                    COALESCE(
                      pr.lastModifiedAt + Duration({milliseconds: 1}),
                      pr.updatedAt,
                      pr.updated_at,
                      datetime()
                    ),
                  pr.lastModifiedBy = COALESCE(pr.lastModifiedBy, 'database/ARTARCH-614_backfill_project_in_sf:1'),
                  pr.updatedAt = Null,
                  pr.updated_at = Null
              ",
              {batchSize:1000, iterateList:true, parallel:false}
            );
        </query>
    </changeset>
</changelog>
