예제 #1
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     // The pretend option can be used for "simulating" the migration and grabbing
     // the SQL queries that would fire if the migration were to be run against
     // a database for real, which is helpful for double checking migrations.
     $pretend = $this->input->getOption('pretend');
     $path = $this->getMigrationPath();
     $this->migrator->run($path, $pretend);
     foreach ($this->migrator->getNotes() as $note) {
         $this->output->writeln($note);
     }
 }
예제 #2
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $pretend = $this->input->getOption('pretend');
     $path = $this->input->getOption('path', null);
     if ($path !== null) {
         $this->migrator->usePath($path);
     }
     $this->migrator->rollback($pretend);
     // Once the migrator has run we will grab the note output and send it out to
     // the console screen, since the migrator itself functions without having
     // any instances of the OutputInterface contract passed into the class.
     foreach ($this->migrator->getNotes() as $note) {
         $this->output->writeln($note);
     }
 }