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

ModifyUsers::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

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