CreateBinaryRolesTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 2 Features 0
Metric Value
eloc 4
c 2
b 2
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateBinaryRolesTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     */
12
    public function up()
13
    {
14
        Schema::create('binary_roles', function (Blueprint $table) {
15
            $table->binary('role_id');
16
            $table->string('name');
17
            $table->unsignedInteger('counter')->default(0);
18
        });
19
    }
20
21
    /**
22
     * Reverse the migrations.
23
     */
24
    public function down()
25
    {
26
        Schema::drop('binary_roles');
27
    }
28
}
29