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

AddColumnsToFeatureTable2   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 6 1
A down() 0 7 1
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