CreateActiveableModelsTable::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
use Illuminate\Support\Facades\Schema;
6
7
class CreateActiveableModelsTable extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create('activeable_models', function (Blueprint $table) {
12
            $table->id();
13
            $table->boolean('is_active');
14
            $table->json('payload')->nullable();
15
            $table->string('object_type');
16
            $table->unsignedBigInteger('object_id');
17
            $table->dateTime('created_at');
18
        });
19
    }
20
21
    public function down()
22
    {
23
        Schema::dropIfExists('activeable_models');
24
    }
25
}
26