CreateFeaturablesTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateFeaturablesTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16 45
        Schema::create('featurables', function (Blueprint $table) {
17 45
            $table->bigIncrements('id');
18
            $table->integer('feature_id');
19 45
20 45
            $table->integer('featurable_id');
21 45
            $table->string('featurable_type');
22 45
        });
23
    }
24
25
    /**
26
     * Reverse the migrations.
27
     *
28
     * @return void
29 45
     */
30
    public function down()
31 45
    {
32 45
        Schema::drop('featurables');
33
    }
34
}
35