Completed
Push — master ( c89019...4c6398 )
by
unknown
01:27
created

CreatePbjTarifsTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 18 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Migrations\Migration;
5
use Illuminate\Database\Schema\Blueprint;
6
use Kalnoy\Nestedset\NestedSet;
7
8
class CreatePbjTarifsTable extends Migration {
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
9
10
	public function up()
11
	{
12
		Schema::create('pbj_tarifs', function(Blueprint $table) {
13
			$table->increments('id');
14
			$table->string('uuid', 191)->unique();
15
			$table->string('uraian', 191)->unique();
16
			$table->boolean('tarif')->default(0);
17
			$table->double('wilayah_kota');
18
			$table->double('wilayah_kabupaten');
19
            NestedSet::columns($table);			
20
			$table->string('satuan', 191)->index();
21
			$table->timestamps();
22
			$table->softDeletes();
23
			$table->integer('master_tarif_id')->unsigned()->nullable()->index();
24
			$table->integer('user_id')->unsigned()->nullable()->index();
25
			$table->integer('user_update')->unsigned()->nullable()->index();
26
		});
27
	}
28
29
	public function down()
30
	{
31
		Schema::drop('pbj_tarifs');
32
	}
33
}