Completed
Push — master ( eebd52...3cd9a5 )
by ARCANEDEV
08:34
created

CreateBlogPostTagPivot   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 32
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A up() 0 8 1
1
<?php
2
3
use Arcanesoft\Blog\Bases\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
/**
7
 * Class     CreateBlogTagsTable
8
 *
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class CreateBlogPostTagPivot extends Migration
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Constructor
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * CreateBlogTagsTable constructor.
19
     */
20
    public function __construct()
21
    {
22
        parent::__construct();
23
24
        $this->setTable('post_tag');
25
    }
26
27
    /* ------------------------------------------------------------------------------------------------
28
     |  Main Functions
29
     | ------------------------------------------------------------------------------------------------
30
     */
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function up()
35
    {
36
        $this->createSchema(function(Blueprint $table) {
37
            $table->increments('id');
38
            $table->integer('post_id')->unsigned();
39
            $table->integer('tag_id')->unsigned();
40
        });
41
    }
42
}
43