CreateUserStatsTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateUserStatsTable extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     */
11
    public function up()
12
    {
13
        Schema::create('user_stats', function (Blueprint $table) {
14
            $table->increments('id');
15
            $table->integer('user_id')->unsigned()->nullable()->index('fk_user_stats_user_id_idx');
16
            $table->integer('code_lines')->unsigned()->nullable();
17
            $table->timestamps();
18
        });
19
    }
20
21
    /**
22
     * Reverse the migrations.
23
     */
24
    public function down()
25
    {
26
        Schema::drop('user_stats');
27
    }
28
}
29