CreateUsersTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 11
c 3
b 0
f 0
dl 0
loc 28
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 11 1
1
<?php
2
namespace app\custom\Database\migrations;
3
4
use app\framework\Component\Database\Migrations\Migration;
5
use app\framework\Component\Database\Schema\Blueprint;
6
use app\framework\Component\Database\Schema\Schema;
7
8
class CreateUsersTable extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        Schema::create("users", function(Blueprint $table) {
18
            $table->increments();
19
            $table->text("username");
20
            $table->string("email")->unique();
21
            $table->string("password");
22
            $table->string('remember_token', 100);
23
            $table->string('reset_password_token', 100);
24
            $table->timestamps();
25
        }, "mysql");
26
    }
27
28
    /**
29
     * Reverse the migrations.
30
     *
31
     * @return void
32
     */
33
    public function down()
34
    {
35
        Schema::drop("users", "mysql");
36
    }
37
}
38