Completed
Push — master ( 72282c...462347 )
by
unknown
9s
created

CreateTarifsTable::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\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Kalnoy\Nestedset\NestedSet;
6
7
class CreateTarifsTable 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...
8
9
	public function up()
10
	{
11
		Schema::create('tarifs', function(Blueprint $table) {
12
			$table->increments('id');
13
			$table->uuid('uuid', 191)->unique();
14
            $table->string('uraian', 191)->unique();
15
            $table->boolean('tarif')->default(0);
16
			$table->double('jasa_pelayanan');
17
			$table->double('jasa_sarana');
18
			$table->string('satuan', 191)->index();
19
			$table->integer('master_tarif_id')->unsigned()->nullable()->index();
20
			$table->integer('user_id')->unsigned()->index();
21
            $table->integer('user_update')->unsigned()->index();
22
            NestedSet::columns($table);
23
			$table->timestamps();
24
			$table->softDeletes();
25
		});
26
	}
27
28
	public function down()
29
	{
30
		Schema::drop('tarifs');
31
	}
32
}
33