Ejemplo n.º 1
0
 /**
  * Run "up" a migration instance.
  *
  * @param  string    $path
  * @param  string    $file
  * @param  string    $path
  * @param  Extension $extension
  * @return void
  */
 protected function runUp($path, $file, Extension $extension = null)
 {
     $migration = $this->resolve($path, $file);
     $this->runClosureMigration($migration);
     // 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($file, $extension ? $extension->getId() : null);
     $this->note("<info>Migrated:</info> {$file}");
 }
Ejemplo n.º 2
0
 /**
  * Run "up" a migration instance.
  *
  * @param  string    $file
  * @param  Extension $extension
  * @return void
  */
 protected function runUp($file, Extension $extension = null)
 {
     // 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($file, $extension);
     $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($file, $extension ? $extension->getId() : null);
     $this->note("<info>Migrated:</info> {$file}");
 }