ExtraFieldsPaymentMethodTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
nc 1
nop 0
dl 0
loc 2
rs 10
c 1
b 0
f 0
1
<?php
2
3
use Illuminate\Database\Schema\Blueprint;
4
use Illuminate\Database\Migrations\Migration;
5
6
class ExtraFieldsPaymentMethodTable extends Migration
7
{
8
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::table('payment_method', function (Blueprint $table) {
17
            $table->integer('order_confirmed_order_status_id')->unsigned()->nullable();
18
            $table->foreign('order_confirmed_order_status_id')->references('id')->on('order_status')->onDelete('set null');
19
            $table->integer('payment_completed_order_status_id')->unsigned()->nullable();
20
            $table->foreign('payment_completed_order_status_id')->references('id')->on('order_status')->onDelete('set null');
21
            $table->integer('payment_failed_order_status_id')->unsigned()->nullable();
22
            $table->foreign('payment_failed_order_status_id')->references('id')->on('order_status')->onDelete('set null');
23
        
24
        });
25
    }
26
27
    /**
28
     * Reverse the migrations.
29
     *
30
     * @return void
31
     */
32
    public function down()
33
    {
34
        //
35
    }
36
}
37