CreateStatusesTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 25
ccs 12
cts 15
cp 0.8
rs 10
c 0
b 0
f 0

2 Methods

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