CreateStatusesTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 12
cts 12
cp 1
rs 9.7
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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