CreateMediaTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 15
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 17
rs 9.7666
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