CreatePullRequestsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 37
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 23 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreatePullRequestsTable extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     */
11
    public function up()
12
    {
13
        Schema::create('pull_requests', function (Blueprint $table) {
14
            $table->increments('id');
15
            $table->integer('github_id')->unsigned()->nullable()->unique();
16
            $table->integer('head_branch_id')->unsigned()->nullable()->index('fk_pull_requests_head_branch_id_idx');
17
            $table->integer('base_branch_id')->unsigned()->nullable()->index('fk_pull_requests_base_branch_id_idx');
18
            $table->integer('user_id')->nullable();
19
            $table->integer('product_backlog_id')->unsigned()->nullable();
20
            $table->integer('number')->unsigned()->nullable();
21
            $table->string('url')->nullable();
22
            $table->string('html_url')->nullable();
23
            $table->string('issue_url')->nullable();
24
            $table->string('commits_url')->nullable();
25
            $table->string('state')->nullable();
26
            $table->string('title')->nullable();
27
            $table->text('body')->nullable();
28
            $table->dateTime('github_created_at')->nullable();
29
            $table->dateTime('github_updated_at')->nullable();
30
            $table->timestamps();
31
            $table->softDeletes();
32
        });
33
    }
34
35
    /**
36
     * Reverse the migrations.
37
     */
38
    public function down()
39
    {
40
        Schema::drop('pull_requests');
41
    }
42
}
43