CreateLogsTable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 19
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A up() 0 19 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateLogsTable extends Migration {
7
    
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up() {
14
        Schema::create('database_logs', function (Blueprint $table) {
15
            $table->bigIncrements('id');
16
            $table->string('env');
17
            $table->string('message', 500);
18
            $table->enum('level', [
19
                'DEBUG',
20
                'INFO',
21
                'NOTICE',
22
                'WARNING',
23
                'ERROR',
24
                'CRITICAL',
25
                'ALERT',
26
                'EMERGENCY'
27
            ])->default('INFO');
28
            $table->text('context');
29
            $table->text('extra');
30
            $table->unsignedBigInteger('user_id')->nullable();
31
            $table->timestamps();
32
        });
33
    }
34
}