CreateTaggedTable   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 11 2
A down() 0 2 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateTaggedTable extends Migration {
7
8
	public function up() {
9
		Schema::create('tagging_tagged', function(Blueprint $table) {
10
			$table->increments('id');
11
			if(config('tagging.primary_keys_type') == 'string') {
12
				$table->string('taggable_id', 36)->index();
13
			} else {
14
				$table->integer('taggable_id')->unsigned()->index();
15
			}
16
			$table->string('taggable_type', 125)->index();
17
			$table->string('tag_name', 125);
18
			$table->string('tag_slug', 125)->index();
19
		});
20
	}
21
22
	public function down() {
23
		Schema::drop('tagging_tagged');
24
	}
25
}
26