CreateMediaTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 17
c 1
b 0
f 0
dl 0
loc 31
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 17 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateMediaTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     */
12
    public function up()
13
    {
14
        Schema::create('media', function (Blueprint $table) {
15
            $table->bigIncrements('id');
16
            $table->uuid('uuid')->default('-');
17
            $table->morphs('model');
18
            $table->string('collection_name');
19
            $table->string('name');
20
            $table->string('file_name');
21
            $table->string('mime_type')->nullable();
22
            $table->string('disk');
23
            $table->unsignedBigInteger('size');
24
            $table->json('manipulations');
25
            $table->json('custom_properties');
26
            $table->json('responsive_images');
27
            $table->unsignedInteger('order_column')->nullable();
28
            $table->nullableTimestamps();
29
        });
30
    }
31
32
    /**
33
     * Reverse the migrations.
34
     */
35
    public function down()
36
    {
37
        Schema::dropIfExists('media');
38
    }
39
}
40