Passed
Push — master ( 1120e7...dcb672 )
by Jesús
02:28
created

CreateImagingImagesTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 33
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 13 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
/**
8
 * Class CreateImagingImagesTable
9
 */
10
class CreateImagingImagesTable extends Migration
11
{
12
    const IMAGES_TABLE = "images";
13
14
    /**
15
     * Run the migrations.
16
     *
17
     * @return void
18
     */
19
    public function up()
20
    {
21
        Schema::create( self::IMAGES_TABLE , function (Blueprint $table)
22
        {
23
            $table->bigIncrements('id');
24
            $table->text('path');
25
            $table->text('filename');
26
            $table->string('type')->nullable()->default(NULL);
27
            $table->boolean('processed')->nullable()->default(FALSE);
28
            $table->text('thumbnails')->nullable()->default(NULL);
29
            $table->text('metadata')->nullable()->default(NULL);
30
            $table->timestampsTz();
31
            $table->softDeletes();
32
        });
33
    }
34
35
    /**
36
     * Reverse the migrations.
37
     *
38
     * @return void
39
     */
40
    public function down()
41
    {
42
        Schema::drop( self::IMAGES_TABLE );
43
    }
44
}
45