CreateOptionValuesTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 11
loc 11
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php namespace Bedard\Shop\Updates;
2
3
use October\Rain\Database\Schema\Blueprint;
4
use October\Rain\Database\Updates\Migration;
5
use Schema;
6
7 View Code Duplication
class CreateOptionValuesTable extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create('bedard_shop_option_values', function (Blueprint $table) {
12
            $table->engine = 'InnoDB';
13
            $table->increments('id');
14
            $table->integer('option_id')->unsigned()->nullable()->index();
15
            $table->integer('sort_order')->unsigned()->default(0)->index();
16
            $table->string('name')->default('');
17
            $table->timestamps();
18
        });
19
    }
20
21
    public function down()
22
    {
23
        Schema::dropIfExists('bedard_shop_option_values');
24
    }
25
}
26