CreateRolesTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 8 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
/**
8
 * Class CreateRolesTable
9
 *
10
 * @author Andrey Girnik <[email protected]>
11
 */
12
class CreateRolesTable extends Migration
13
{
14
    /**
15
     * Run the migrations.
16
     * @return void
17
     */
18
    public function up()
19
    {
20
        Schema::create('roles', function (Blueprint $table) {
21
            $table->increments('id');
22
            $table->string('name', 191);
23
            $table->string('slug', 191)->unique();
24
            $table->string('description', 191);
25
            $table->timestamps();
26
        });
27
    }
28
29
    /**
30
     * Reverse the migrations.
31
     * @return void
32
     */
33
    public function down()
34
    {
35
        Schema::dropIfExists('roles');
36
    }
37
}
38