CreateRolesTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
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