@@ -42,8 +42,9 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | if (!Schema::connection($this->connection)->hasTable($this->collection)) { |
| 44 | 44 | Schema::connection($this->connection)->create($this->collection, function (Blueprint $collection) { |
| 45 | - if (method_exists($this, 'migrate')) |
|
| 46 | - $this->migrate($collection); |
|
| 45 | + if (method_exists($this, 'migrate')) { |
|
| 46 | + $this->migrate($collection); |
|
| 47 | + } |
|
| 47 | 48 | }); |
| 48 | 49 | } |
| 49 | 50 | } |
@@ -56,8 +57,9 @@ discard block |
||
| 56 | 57 | final public function down() |
| 57 | 58 | { |
| 58 | 59 | if (Schema::connection($this->connection)->hasTable($this->collection)) { |
| 59 | - if (method_exists($this, 'destroy')) |
|
| 60 | - $this->destroy(); |
|
| 60 | + if (method_exists($this, 'destroy')) { |
|
| 61 | + $this->destroy(); |
|
| 62 | + } |
|
| 61 | 63 | Schema::connection($this->connection)->drop($this->collection); |
| 62 | 64 | } |
| 63 | 65 | } |