Completed
Push — master ( e22e92...9abbc7 )
by
unknown
8s
created

AddStackIdToNotifications::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Schema\Blueprint;
4
use Illuminate\Database\Migrations\Migration;
5
6
class AddStackIdToNotifications extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        Schema::table('notifications', function (Blueprint $table) {
16
            $table->integer('stack_id')->unsigned()->nullable()->after('expire_time');
17
        });
18
    }
19
20
    /**
21
     * Reverse the migrations.
22
     *
23
     * @return void
24
     */
25
    public function down()
26
    {
27
        Schema::table('notifications', function (Blueprint $table) {
28
            $table->dropColumn('stack_id');
29
        });
30
    }
31
}
32