CreatePullRequestsTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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