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

CreateAttacherImagesTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 10

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 16
rs 9.4285
cc 1
eloc 10
nc 1
nop 0
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