Test Failed
Push — 1.1 ( ecfb4c...3ddbea )
by
unknown
04:06 queued 02:03
created

CreateLaravelOpdTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 2
Metric Value
wmc 2
c 2
b 1
f 2
dl 0
loc 33
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 15 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
9
10
class CreateLaravelOpdTable extends Migration
11
{
12
    /**
13
     * Run the migrations.
14
     *
15
     * @return void
16
     */
17
    public function up()
18
    {
19
        Schema::create('opd', function (Blueprint $table) {
20
            //$table->increments('id');
21
            $table->uuid('id')->unique();
22
            $table->primary('id');
23
            $table->string('kunker')->index();
24
            $table->string('name');
25
            $table->string('kunker_sinjab')->nullable();            
26
            $table->string('kunker_simral')->nullable();
27
            $table->integer('levelunker');
28
            $table->string('njab');
29
            $table->string('npej');
30
            NestedSet::columns($table);
31
            $table->timestamps();   
32
        });
33
    }
34
35
    /**
36
     * Reverse the migrations.
37
     *
38
     * @return void
39
     */
40
    public function down()
41
    {
42
        Schema::dropIfExists('opd');
43
    }
44
}
45