CreateTagsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
c 0
b 0
f 0
dl 0
loc 17
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 9 1
A down() 0 3 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateTagsTable extends Migration
7
{
8
	public function up()
9
	{
10
		Schema::create('tagging_tags', function(Blueprint $table) {
11
			$table->increments('id');
12
			$table->string('slug', 125)->index();
13
			$table->string('name', 125);
14
			$table->boolean('suggest')->default(false);
15
			$table->integer('count')->unsigned()->default(0); // count of how many times this tag was used
16
            $table->integer('tag_group_id')->unsigned()->nullable();
17
		});
18
	}
19
20
	public function down()
21
	{
22
		Schema::drop('tagging_tags');
23
	}
24
}
25