private function setMigrationApplied(Name $name, $isApplied)
    {
        $collection = $this->getAppliedCollection();
        $criteria = ['className' => (string) $name];
        $newObj = ['$set' => ['className' => (string) $name, 'isApplied' => $isApplied]];
        $collection->upsert($criteria, $newObj);
    }