CreateUsersTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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