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

CreateMediaTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 22
rs 9.568
c 0
b 0
f 0
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