src/Mongrate/Service/MigrationService.php
public function migrate(Name $name, Direction $direction, OutputInterface $output)
    {
        $migration = $this->createMigrationInstance($name, $output);

        $output->writeln('<info>Migrating ' . $direction . '...</info> <comment>' . $name . '</comment>');

        if ($direction->isUp()) {
            $migration->up($this->getDatabase());
            $this->setMigrationApplied($name, true);
        } else {
            $migration->down($this->getDatabase());
            $this->setMigrationApplied($name, false);
        }

        $output->writeln('<info>Migrated ' . $direction . '</info>');
    }
public function migrate(Name $name, Direction $direction, OutputInterface $output)
    {
        $migration = $this->createMigrationInstance($name, $output);

        $output->writeln('<info>Migrating ' . $direction . '...</info> <comment>' . $name . '</comment>');

        if ($direction->isUp()) {
            $migration->up($this->getDatabase());
            $this->setMigrationApplied($name, true);
        } else {
            $migration->down($this->getDatabase());
            $this->setMigrationApplied($name, false);
        }

        $output->writeln('<info>Migrated ' . $direction . '</info>');
    }
public function migrate ( Name $ name , Direction $ direction , OutputInterface $ output ) { $ migration = $ this -> createMigrationInstance ( $ name , $ output ) ; $ output -> writeln ( '<info>Migrating ' . $ direction . '...</info> <comment>' . $ name . '</comment>' ) ; if ( $ direction -> isUp ( ) ) { $ migration -> up ( $ this -> getDatabase ( ) ) ; $ this -> setMigrationApplied ( $ name , true ) ; } else { $ migration -> down ( $ this -> getDatabase ( ) ) ; $ this -> setMigrationApplied ( $ name , false ) ; } $ output -> writeln ( '<info>Migrated ' . $ direction . '</info>' ) ; }
Migrate up or down.

@param Direction $direction
Migrate up or down .