Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Setup Failed
Branch master (114f68)
by Mark
08:50
created

OrganiseMenuTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 3
Bugs 1 Features 0
Metric Value
dl 0
loc 45
rs 10
c 3
b 1
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
B up() 0 29 1
A down() 0 2 1
1
<?php
2
3
use App\Model\Menu;
4
use Illuminate\Support\Facades\Schema;
5
use Illuminate\Database\Schema\Blueprint;
6
use Illuminate\Database\Migrations\Migration;
7
8
class OrganiseMenuTable extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        Schema::table('menus', function (Blueprint $table) {
18
            $table->dropColumn('slug');
19
            $table->dropColumn('icon');
20
21
            $table->renameColumn('link', 'hyperlink');
22
            $table->renameColumn('page_id', 'page_id');
23
            $table->renameColumn('menu_id', 'parent_id');
24
            $table->renameColumn('order_id', 'order');
25
            $table->renameColumn('required', 'lock');
26
            $table->renameColumn('enabled', 'status');
27
            $table->renameColumn('editor_id', 'editor_id');
28
            $table->renameColumn('creator_id', 'creator_id');
29
        });
30
31
        Schema::table('menus', function (Blueprint $table) {
32
            $table->boolean('lock')->default(0)->nullable(false)->change();
33
        });
34
35
        $menu = new Menu;
36
        $menu->title = ('Homepage');
37
        $menu->target = ('_self');
38
        $menu->order = 1;
39
        $menu->page_id = 1;
40
        $menu->status = true;
41
        $menu->lock = true;
42
        $menu->creator_id = 1;
43
        $menu->save();
44
    }
45
46
    /**
47
     * Reverse the migrations.
48
     *
49
     * @return void
50
     */
51
    public function down()
52
    {
53
        //
54
    }
55
}
56