Ejemplo n.º 1
0
 /**
  * Run "down" a migration instance.
  *
  * @param            $path
  * @param  string    $file
  * @param  string    $path
  * @param  Extension $extension
  * @return void
  */
 protected function runDown($path, $file, Extension $extension = null)
 {
     $migration = $this->resolve($path, $file);
     $this->runClosureMigration($migration, 'down');
     // Once we have successfully run the migration "down" we will remove it from
     // the migration repository so it will be considered to have not been run
     // by the application then will be able to fire by any later operation.
     $this->repository->delete($file, $extension ? $extension->getId() : null);
     $this->note("<info>Rolled back:</info> {$file}");
 }
Ejemplo n.º 2
0
 /**
  * Run "down" a migration instance.
  *
  * @param  string    $file
  * @param  Extension $extension
  * @return void
  */
 protected function runDown($file, Extension $extension = null)
 {
     // First we will get the file name of the migration so we can resolve out an
     // instance of the migration. Once we get an instance we can either run a
     // pretend execution of the migration or we can run the real migration.
     $instance = $this->resolve($file, $extension);
     $instance->down();
     // Once we have successfully run the migration "down" we will remove it from
     // the migration repository so it will be considered to have not been run
     // by the application then will be able to fire by any later operation.
     $this->repository->delete($file, $extension ? $extension->getId() : null);
     $this->note("<info>Rolled back:</info> {$file}");
 }