Completed
Push — master ( ca2ce7...736bdc )
by Caio
02:57
created

CreateAttacherImagesTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 34
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 16 1
A down() 0 4 1
1
<?php
2
namespace CbCaio\ImgAttacher;
3
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
use Illuminate\Support\Facades\Schema;
7
8
class CreateAttacherImagesTable extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
18
        Schema::create('attacher_images', function (Blueprint $table)
0 ignored issues
show
Bug introduced by
The method create() does not exist on Illuminate\Support\Facades\Schema. Did you maybe mean createFreshMockInstance()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
19
        {
20
            $table->increments('id');
21
            $table->unsignedInteger('owner_id')->index();
22
            $table->string('owner_type')->index();
23
            $table->string('file_extension');
24
            $table->string("file_name")->nullable();
25
            $table->smallInteger("file_size", FALSE, TRUE)->nullable();
26
            $table->string("mime_type")->nullable();
27
            $table->timestamps();
28
        });
29
30
    }
31
32
    /**
33
     * Reverse the migrations.
34
     *
35
     * @return void
36
     */
37
    public function down()
38
    {
39
        Schema::drop('attacher_images');
40
    }
41
}
42