CreateUsersTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 36
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 22 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateUsersTable extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     */
11
    public function up()
12
    {
13
        Schema::create('users', function (Blueprint $table) {
14
            $table->increments('id');
15
            $table->bigInteger('github_id')->nullable()->unique();
16
            $table->string('username')->nullable()->index('users_username');
17
            $table->string('name');
18
            $table->string('avatar')->nullable();
19
            $table->string('html_url')->nullable();
20
            $table->string('email')->nullable();
21
            $table->string('password')->nullable()->default('null');
22
            $table->string('remember_token', 100)->nullable();
23
            $table->string('bio')->nullable();
24
            $table->string('location')->nullable();
25
            $table->string('blog')->nullable();
26
            $table->date('since')->nullable();
27
            $table->string('token')->nullable();
28
            $table->integer('main_repository')->unsigned()->nullable();
29
            $table->string('position_held', 45)->nullable();
30
            $table->timestamps();
31
        });
32
    }
33
34
    /**
35
     * Reverse the migrations.
36
     */
37
    public function down()
38
    {
39
        Schema::drop('users');
40
    }
41
}
42