Test Failed
Branch master (1006b0)
by Julien
02:54
created

CreateUsersTable::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
namespace YourVendor;
3
4
use Illuminate\Database\Migrations\Migration;
5
use Illuminate\Database\Schema\Blueprint;
6
7
class CreateUsersTable extends Migration
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('name');
19
            $table->string('email')->unique();
20
            $table->string('password', 60);
21
22
            $table->rememberToken();
23
            $table->timestamps();
24
            $table->engine = 'InnoDB';
25
        });
26
    }
27
28
    /**
29
     * Reverse the migrations.
30
     *
31
     * @return void
32
     */
33
    public function down()
34
    {
35
        DB::statement('SET FOREIGN_KEY_CHECKS = 0');
36
        Schema::dropIfExists('users');
37
        DB::statement('SET FOREIGN_KEY_CHECKS = 1');
38
    }
39
}
40