/** * @return void */ public function fire() { $this->migrator->setConnection($this->input->getOption('database')); $pretend = $this->input->getOption('pretend'); $this->migrator->rollback($pretend); foreach ($this->migrator->getNotes() as $note) { $this->output->writeln($note); } }
/** * Execute the console command. * @return void */ public function fire() { $this->migrator->setConnection($this->input->getOption('database')); if (!$this->migrator->repositoryExists()) { $this->output->writeln('<comment>Migration table not found.</comment>'); return; } $pretend = $this->input->getOption('pretend'); $this->migrator->reset($pretend); foreach ($this->migrator->getNotes() as $note) { $this->output->writeln($note); } }
/** * @return void */ public function fire() { $this->prepareDatabase(); $pretend = $this->input->getOption('pretend'); if (!is_null($path = $this->input->getOption('path'))) { $path = $this->notadd->basePath() . '/' . $path; } else { $path = $this->getMigrationPath(); } $this->migrator->run($path, $pretend); foreach ($this->migrator->getNotes() as $note) { $this->output->writeln($note); } if ($this->input->getOption('seed')) { $this->call('db:seed', ['--force' => true]); } }