CreateUsersTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 9.2
c 0
b 0
f 0
cc 1
eloc 19
nc 1
nop 0
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