Passed
Push — dependabot/npm_and_yarn/string... ( b56eb5...bc569b )
by
unknown
45:46 queued 33s
created

ChangeUsersTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class ChangeUsersTable extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create('chief_users', function (Blueprint $table) {
12
            $table->increments('id');
13
            $table->string('firstname');
14
            $table->string('lastname');
15
            $table->string('email')->unique();
16
            $table->string('password')->nullable();
17
            $table->boolean('enabled')->default(0);
18
            $table->rememberToken();
19
            $table->timestamp('last_login')->nullable();
20
            $table->timestamps();
21
        });
22
23
        Schema::create('chief_password_resets', function (Blueprint $table) {
24
            $table->string('email')->index();
25
            $table->string('token')->index();
26
            $table->timestamp('created_at')->nullable();
27
        });
28
    }
29
30
    public function down()
31
    {
32
        Schema::dropIfExists('chief_users');
33
        Schema::dropIfExists('chief_password_resets');
34
    }
35
}
36