| @@ 38-53 (lines=16) @@ | ||
| 35 | * |
|
| 36 | * @return mixed |
|
| 37 | */ |
|
| 38 | public function handle(Migrator $migrator) |
|
| 39 | { |
|
| 40 | if (!$this->confirmToProceed()) { |
|
| 41 | return; |
|
| 42 | } |
|
| 43 | ||
| 44 | $migrator->makeLogTable(); |
|
| 45 | ||
| 46 | $this->doRefresh($migrator); |
|
| 47 | ||
| 48 | $seed = $this->option('seed'); |
|
| 49 | ||
| 50 | if ($seed) { |
|
| 51 | $this->call('database:seed', ['name' => $seed, '--force' => true]); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Execute clean and upgrade. |
|
| @@ 38-53 (lines=16) @@ | ||
| 35 | * |
|
| 36 | * @return mixed |
|
| 37 | */ |
|
| 38 | public function handle(Migrator $migrator) |
|
| 39 | { |
|
| 40 | if (!$this->confirmToProceed()) { |
|
| 41 | return; |
|
| 42 | } |
|
| 43 | ||
| 44 | $migrator->makeLogTable(); |
|
| 45 | ||
| 46 | $this->migrateToLatest($migrator); |
|
| 47 | ||
| 48 | $seed = $this->option('seed'); |
|
| 49 | ||
| 50 | if ($seed) { |
|
| 51 | $this->call('database:seed', ['name' => $seed, '--force' => true]); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Migrate dataase to latest version. |
|