コード例 #1
0
ファイル: Migrator.php プロジェクト: artesaos/migrator
 /**
  * Run "up" a migration instance.
  *
  * @param  string  $class
  * @param  int     $batch
  * @param  bool    $pretend
  * @return void
  */
 protected function runUp($class, $batch, $pretend)
 {
     // First we will resolve a "real" instance of the migration class from this
     // migration file name. Once we have the instances we can run the actual
     // command such as "up" or "down", or we can just simulate the action.
     $migration = $this->resolve($class);
     if ($pretend) {
         return $this->pretendToRun($migration, 'up');
     }
     $migration->up();
     // Once we have run a migrations class, we will log that it was run in this
     // repository so that we don't try to run it next time we do a migration
     // in the application. A migration repository keeps the migrate order.
     $this->repository->log($class, $batch);
     $this->note("<info>Migrated:</info> {$class}");
 }