GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

CreateTransactionsTable::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
use Illuminate\Support\Facades\Schema;
6
7
class CreateTransactionsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('transactions', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->integer('user_id')->unsigned();
19
            $table->timestamp('transaction_date')->nullable();
20
            $table->integer('status_id')->unsigned()->nullable();
21
            $table->integer('type_id')->unsigned();
22
            $table->string('account_name'); // should not be linked through a FK since a account can be deleted anytime
23
            $table->string('to_account_name')->nullable();
24
            $table->string('payee_name');
25
            $table->string('category_name');
26
            $table->string('sub_category_name')->nullable();
27
            $table->decimal('amount');
28
            $table->text('notes')->nullable();
29
            $table->softDeletes();
30
            $table->timestamps();
31
        });
32
33
        Schema::table('transactions', function (Blueprint $table) {
34
            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
35
            $table->foreign('status_id')->references('id')->on('transaction_status');
36
            $table->foreign('type_id')->references('id')->on('transaction_types');
37
        });
38
    }
39
40
    /**
41
     * Reverse the migrations.
42
     *
43
     * @return void
44
     */
45
    public function down()
46
    {
47
        Schema::dropIfExists('transactions');
48
    }
49
}
50