CreateModelLogsTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateModelLogsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14 14
    public function up()
15
    {
16
        Schema::create('model_logs', function (Blueprint $table) {
17 14
            $table->increments('id');
18 14
            $table->morphs('subject');
19 14
            $table->string('causer_type')->nullable();
20 14
            $table->integer('causer_id')->nullable();
21 14
            $table->string('description');
22 14
            $table->string('action');
23 14
            $table->json('old')->nullable();
24 14
            $table->json('new');
25 14
            $table->string('route')->nullable();
26 14
            $table->string('reverter_type')->nullable();
27 14
            $table->string('reverter_id')->nullable();
28 14
            $table->timestamp('reverted_at')->nullable();
29 14
            $table->string('revert_note')->nullable();
30 14
            $table->softDeletes();
31 14
            $table->timestamps();
32 14
        });
33 14
    }
34
35
    /**
36
     * Reverse the migrations.
37
     *
38
     * @return void
39
     */
40
    public function down()
41
    {
42
        Schema::dropIfExists('model_logs');
43
    }
44
}
45