CreateImagingImagesTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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