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

CreatePbjTarifsTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 15
nc 1
nop 0
dl 0
loc 18
rs 9.4285
c 0
b 0
f 0
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
}