CreateUsersTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 14
dl 0
loc 33
rs 10
c 2
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 14 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateUsersTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create(
17
            'users', function (Blueprint $table) {
18
                $table->increments('id');
19
                $table->unsignedInteger('upload_id')->nullable();
20
                $table->unsignedInteger('related_id')->nullable();
21
                $table->string('name');
22
                $table->string('email')->unique();
23
                $table->string('password');
24
                $table->rememberToken();
25
                $table->string('location')->nullable();
26
                $table->timestamps();
27
                $table->softDeletes();
28
            }
29
        );
30
    }
31
32
    /**
33
     * Reverse the migrations.
34
     *
35
     * @return void
36
     */
37
    public function down()
38
    {
39
        Schema::dropIfExists('users');
40
    }
41
}
42