Passed
Push — master ( f218e6...f51c1b )
by Arthur
04:59
created

CreateUserMigration   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 13
dl 0
loc 30
rs 10
c 1
b 1
f 0
wmc 2

2 Methods

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