src/Mongrate/Service/MigrationService.php
public function isMigrationApplied(Name $name)
    {
        $this->ensureMigrationExists($name);

        $collection = $this->getAppliedCollection();
        $criteria = ['className' => (string) $name];
        $record = $collection->find($criteria)->getSingleResult();

        if ($record === null) {
            return false;
        } else {
            return (bool) $record['isApplied'];
        }
    }
public function isMigrationApplied(Name $name)
    {
        $this->ensureMigrationExists($name);

        $collection = $this->getAppliedCollection();
        $criteria = ['className' => (string) $name];
        $record = $collection->find($criteria)->getSingleResult();

        if ($record === null) {
            return false;
        } else {
            return (bool) $record['isApplied'];
        }
    }
public function isMigrationApplied ( Name $ name ) { $ this -> ensureMigrationExists ( $ name ) ; $ collection = $ this -> getAppliedCollection ( ) ; $ criteria = [ 'className' => ( string ) $ name ] ; $ record = $ collection -> find ( $ criteria ) -> getSingleResult ( ) ; if ( $ record === null ) { return false ; } else { return ( bool ) $ record [ 'isApplied' ] ; } }
Check if a migration has been applied.

@param Name $name name of the migration.
@return bool
Check if a migration has been applied .