CreateGroupsTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Support\Facades\Artisan;
5
use Illuminate\Database\Schema\Blueprint;
6
use Illuminate\Database\Migrations\Migration;
7
8
class CreateGroupsTable extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        Schema::create('groups', function (Blueprint $table) {
18
            $table->id();
19
            $table->string('name');
20
            $table->integer('type')->default(1);
21
            $table->timestamps();
22
        });
23
24
        Artisan::call('make:permission Group --all');
25
    }
26
27
    /**
28
     * Reverse the migrations.
29
     *
30
     * @return void
31
     */
32
    public function down()
33
    {
34
        Schema::dropIfExists('groups');
35
    }
36
}
37