Completed
Push — master ( 1a56f9...9378a2 )
by Mohamed
17:07
created

CreateMediaTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 4

2 Methods

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