CreateUsersTables   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 19 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateUsersTables extends Migration
7
{
8
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('users', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('username')->unique();
19
            $table->string('password', 64);
20
            $table->string('email')->index();
21
            $table->string('first_name')->index()->nullable();
22
            $table->string('last_name')->index()->nullable();
23
            $table->string('display_name')->index()->nullable();
24
            $table->string('timezone')->default('Europe/London');
25
            $table->string('location')->nullable();
26
            $table->string('url')->nullable();
27
            $table->string('remember_token', 100)->nullable();
28
            $table->boolean('super_flag')->default(0);
29
            $table->timestamps();
30
            $table->softDeletes();
31
        });
32
    }
33
34
    /**
35
     * Reverse the migrations.
36
     *
37
     * @return void
38
     */
39
    public function down()
40
    {
41
        Schema::drop('users');
42
    }
43
}
44