CreateBrandsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 20 1
A down() 0 4 1
1
<?php namespace VojtaSvoboda\Brands\Updates;
2
3
use Schema;
4
use October\Rain\Database\Schema\Blueprint;
5
use October\Rain\Database\Updates\Migration;
6
7
class CreateBrandsTable extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create('vojtasvoboda_brands_brands', function(Blueprint $table)
12
        {
13
            $table->engine = 'InnoDB';
14
            $table->increments('id')->unsigned();
15
16
            $table->string('name', 300);
17
            $table->string('slug', 300)->nullable();
18
            $table->text('description', 300)->nullable();
19
            $table->string('external_link', 300)->nullable();
20
            $table->boolean('no_link')->default(false);
21
22
            $table->boolean('enabled')->default(true);
23
            $table->smallInteger('sort_order')->nullable();
24
25
            $table->timestamps();
26
            $table->softDeletes();
27
        });
28
    }
29
30
    public function down()
31
    {
32
        Schema::dropIfExists('vojtasvoboda_brands_brands');
33
    }
34
}
35