Passed
Push — tests ( 722676...5a1186 )
by Dallas
12:44
created

AddColumnsToFeatureTable2::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
use Illuminate\Database\Migrations\Migration;
6
use Illuminate\Database\Schema\Blueprint;
7
use Illuminate\Support\Facades\DB;
8
use Illuminate\Support\Facades\Schema;
9
10
class AddColumnsToFeatureTable2 extends Migration
11
{
12
    public function up(): void
13
    {
14
        DB::transaction(function () {
15
            Schema::table('feature_table2', function (Blueprint $table) {
16
                $table->string('name');
17
                $table->string('code');
18
            });
19
        });
20
    }
21
22
    public function down(): void
23
    {
24
        DB::transaction(function () {
25
            Schema::table('feature_table2', function (Blueprint $table) {
26
                $table->dropColumn([
27
                    'name',
28
                    'code',
29
                ]);
30
            });
31
        });
32
    }
33
}
34