UpdateTagsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 6
c 3
b 0
f 0
dl 0
loc 16
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 5 1
A up() 0 4 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class UpdateTagsTable extends Migration {
7
8
	public function up()
9
	{
10
		Schema::table('tagging_tags', function ($table) {
11
			$table->foreign('tag_group_id')->references('id')->on('tagging_tag_groups');
12
		});
13
14
	}
15
16
17
	public function down()
18
	{
19
        Schema::disableForeignKeyConstraints();
20
		Schema::table('tagging_tags', function ($table) {
21
			$table->dropForeign('tagging_tags_tag_group_id_foreign');
22
		});
23
	}
24
}
25