|
9 | 9 | use Illuminate\Database\Schema\Grammars\Grammar;
|
10 | 10 | use Illuminate\Database\Schema\Grammars\MySqlGrammar;
|
11 | 11 | use Illuminate\Database\Schema\Grammars\SQLiteGrammar;
|
12 |
| -use Illuminate\Support\Facades\Schema; |
13 | 12 | use Illuminate\Support\Fluent;
|
14 | 13 | use Illuminate\Support\Traits\Macroable;
|
15 | 14 |
|
@@ -428,25 +427,6 @@ public function dropColumn($columns)
|
428 | 427 | return $this->addCommand('dropColumn', compact('columns'));
|
429 | 428 | }
|
430 | 429 |
|
431 |
| - /** |
432 |
| - * Indicate that the given columns should be dropped if they exist. |
433 |
| - * |
434 |
| - * @param array|mixed $columns |
435 |
| - * @return \Illuminate\Support\Fluent |
436 |
| - */ |
437 |
| - public function dropColumnIfExists($columns) |
438 |
| - { |
439 |
| - $columns = is_array($columns) ? $columns : func_get_args(); |
440 |
| - |
441 |
| - $columns = array_intersect($columns, Schema::getColumnListing($this->getTable())); |
442 |
| - |
443 |
| - if (empty($columns)) { |
444 |
| - return new Fluent; |
445 |
| - } |
446 |
| - |
447 |
| - return $this->dropColumn($columns); |
448 |
| - } |
449 |
| - |
450 | 430 | /**
|
451 | 431 | * Indicate that the given columns should be renamed.
|
452 | 432 | *
|
@@ -525,25 +505,6 @@ public function dropForeign($index)
|
525 | 505 | return $this->dropIndexCommand('dropForeign', 'foreign', $index);
|
526 | 506 | }
|
527 | 507 |
|
528 |
| - /** |
529 |
| - * Indicate that the given foreign key should be dropped if it exists. |
530 |
| - * |
531 |
| - * @param string|array $index |
532 |
| - * @return \Illuminate\Support\Fluent |
533 |
| - */ |
534 |
| - public function dropForeignIfExists($index) |
535 |
| - { |
536 |
| - if (is_array($index)) { |
537 |
| - $index = $this->createIndexName('foreign', $index); |
538 |
| - } |
539 |
| - |
540 |
| - if (! in_array($index, Schema::getForeignKeys($this->getTable()))) { |
541 |
| - return new Fluent; |
542 |
| - } |
543 |
| - |
544 |
| - return $this->dropIndexCommand('dropForeign', 'foreign', $index); |
545 |
| - } |
546 |
| - |
547 | 508 | /**
|
548 | 509 | * Indicate that the given column and foreign key should be dropped.
|
549 | 510 | *
|
|
0 commit comments