CreateSwivelTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

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