CreateFirewallLogsTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateFirewallLogsTable extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        Schema::create('firewall_logs', function (Blueprint $table) {
16
            $table->increments('id');
17
            $table->string('ip');
18
            $table->string('level')->default('medium');
19
            $table->string('middleware');
20
            $table->integer('user_id')->nullable();
21
            $table->string('url')->nullable();
22
            $table->string('referrer')->nullable();
23
            $table->text('request')->nullable();
24
            $table->timestamps();
25
            $table->softDeletes();
26
            
27
            $table->index('ip');
28
        });
29
    }
30
31
    /**
32
     * Reverse the migrations.
33
     *
34
     * @return void
35
     */
36
    public function down()
37
    {
38
        Schema::drop('firewall_logs');
39
    }
40
}
41