Test Failed
Pull Request — 1.1 (#6)
by
unknown
02:03
created

CreateTableOpd::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 15
rs 9.4285
cc 1
eloc 12
nc 1
nop 0
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 CreateTableOpd extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        Schema::create('opd', function (Blueprint $table) {
18
            //$table->increments('id');
19
            $table->uuid('id')->unique();
20
            $table->primary('id');
21
            $table->string('kunker')->index();
22
            $table->string('name');
23
            $table->string('kunker_sinjab')->nullable();            
24
            $table->string('kunker_simral')->nullable();
25
            $table->integer('levelunker');
26
            $table->string('njab');
27
            $table->string('npej');
28
            NestedSet::columns($table);
29
            $table->timestamps();   
30
        });
31
    }
32
33
    /**
34
     * Reverse the migrations.
35
     *
36
     * @return void
37
     */
38
    public function down()
39
    {
40
        Schema::dropIfExists('opd');
41
    }
42
}
43