Completed
Push — master ( 0e1003...1276c7 )
by Abdelrahman
61:46 queued 59:06
created

CreateMediaTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 18
rs 9.6666
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
use Illuminate\Support\Facades\Schema;
6
use Illuminate\Database\Schema\Blueprint;
7
use Illuminate\Database\Migrations\Migration;
8
9
class CreateMediaTable extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
10
{
11
    /**
12
     * Run the migrations.
13
     */
14
    public function up()
15
    {
16
        Schema::create(config('cortex.foundation.tables.media'), function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->morphs('model');
19
            $table->string('collection_name');
20
            $table->string('name');
21
            $table->string('file_name');
22
            $table->string('mime_type')->nullable();
23
            $table->string('disk');
24
            $table->integer('size')->unsigned();
25
            $table->json('manipulations');
26
            $table->json('custom_properties');
27
            $table->json('responsive_images');
28
            $table->integer('order_column')->unsigned()->nullable();
29
            $table->timestamps();
30
        });
31
    }
32
33
    /**
34
     * Reverse the migrations.
35
     */
36
    public function down()
37
    {
38
        Schema::dropIfExists(config('cortex.foundation.tables.media'));
39
    }
40
}
41