Passed
Push — dependabot/npm_and_yarn/string... ( b56eb5...bc569b )
by
unknown
45:46 queued 33s
created

CreateActivityLogTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateActivityLogTable extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create(config('activitylog.table_name'), function (Blueprint $table) {
12
            $table->increments('id');
13
            $table->string('log_name')->nullable();
14
            $table->text('description');
15
            $table->integer('subject_id')->nullable();
16
            $table->string('subject_type')->nullable();
17
            $table->integer('causer_id')->nullable();
18
            $table->string('causer_type')->nullable();
19
            $table->text('properties')->nullable();
20
            $table->timestamps();
21
22
            $table->index('log_name');
23
        });
24
    }
25
26
    public function down()
27
    {
28
        Schema::drop(config('activitylog.table_name'));
29
    }
30
}
31