Passed
Branch 1.0 (908540)
by Provinsi
03:23
created

CreateLaravelOpdTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 12 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
use Kalnoy\Nestedset\NestedSet;
7
8
class CreateLaravelOpdTable extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        
18
19
        Schema::create('ref_unkerjas', function (Blueprint $table) {            
20
            $table->increments('id');
21
            $table->string('kunker',191)->index();
22
            $table->string('name',191);
23
            $table->string('kunker_simral',191)->nullable();
24
            $table->integer('levelunker');
25
            NestedSet::columns($table);
26
            $table->timestamps();            
27
        });
28
    }
29
30
    /**
31
     * Reverse the migrations.
32
     *
33
     * @return void
34
     */
35
    public function down()
36
    {
37
        Schema::dropIfExists('ref_unkerjas');
38
    }
39
}
40