/** * @return void */ protected function prepareDatabase() { $this->migrator->setConnection($this->input->getOption('database')); if (!$this->migrator->repositoryExists()) { $options = ['--database' => $this->input->getOption('database')]; $this->call('migrate:install', $options); } }
/** * @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); } }
/** * @param string $path * @return array */ protected function getAllMigrationFiles($path) { return $this->migrator->getMigrationFiles($path); }