Passed
Branch master (86baa9)
by Andrey
07:11 queued 13s
created

CreatePermissionsTable::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
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 CreatePermissionsTable
9
 *
10
 * @author Andrey Girnik <[email protected]>
11
 */
12
class CreatePermissionsTable extends Migration
13
{
14
    /**
15
     * Run the migrations.
16
     * @return void
17
     */
18
    public function up()
19
    {
20
        Schema::create('permissions', 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('permissions');
36
    }
37
}
38