Passed
Push — master ( b2403f...1badbf )
by Ferry
07:20 queued 02:39
created

ModifyUsers   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 8 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class ModifyUsers extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        Schema::table('users', function (Blueprint $table) {
16
            $table->string('photo')->nullable();
17
            $table->integer('cb_roles_id');
18
            $table->ipAddress("ip_address")->nullable();
19
            $table->string("user_agent")->nullable();
20
            $table->timestamp("login_at")->nullable();
21
        });
22
    }
23
24
    /**
25
     * Reverse the migrations.
26
     *
27
     * @return void
28
     */
29
    public function down()
30
    {
31
        Schema::table('users', function (Blueprint $table) {
32
            $table->dropColumn(["photo","cb_roles_id","ip_address","user_agent","login_at"]);
33
        });
34
    }
35
}
36