CreatePayuTransactionsTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 9.6666
c 0
b 0
f 0
cc 1
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 CreatePayuTransactionsTable extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create('payu_transactions', function (Blueprint $table) {
12
            $table->id();
13
            $table->unsignedBigInteger('paid_for_id')->nullable();
14
            $table->string('paid_for_type')->nullable();
15
            $table->string('transaction_id')->unique();
16
            $table->text('gateway');
17
            $table->text('body');
18
            $table->string('destination');
19
            $table->text('hash');
20
            $table->text('response')->nullable();
21
            $table->enum('status', ['pending', 'failed', 'successful', 'invalid'])->default('pending')->index();
22
            $table->timestamp('verified_at')->nullable()->index();
23
            $table->softDeletes();
24
            $table->timestamps();
25
        });
26
    }
27
}
28