CreateUsersTables::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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