CreateInstamojoPaymentTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 26
dl 0
loc 44
rs 10
c 1
b 1
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 26 1
A down() 0 3 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateInstamojoPaymentTable extends Migration
8
{
9
    /**
10
    * Run the migrations.
11
    *
12
    * @return void
13
    */
14
    public function up()
15
    {
16
        Schema::create('instamojo_payment', function (Blueprint $table) {
17
            $table->engine = 'InnoDB';
18
            $table->charset = 'utf8mb4';
19
            $table->collation = 'utf8mb4_unicode_ci';
20
            $table->increments('id');
21
            $table->integer('user_id')->unsigned();
22
            $table->foreign('user_id')->references('id')->on('users');
23
            $table->string('buyer_email');
24
            $table->string('buyer_name');
25
            $table->string('buyer_phone');
26
            $table->string('currency');
27
            $table->string('amount');
28
            $table->string('fees');
29
            $table->string('longurl');
30
            $table->string('payment_id');
31
            $table->string('payment_request_id');
32
            $table->string('purpose');
33
            $table->string('shorturl')->nullable();
34
            $table->string('request_status');
35
            $table->string('payment_status');
36
            $table->integer('created_by');
37
            $table->integer('updated_by')->nullable();
38
            $table->dateTime('deleted_at')->nullable();
39
            $table->timestamps();
40
        });
41
    }
42
43
    /**
44
    * Reverse the migrations.
45
    *
46
    * @return void
47
    */
48
    public function down()
49
    {
50
        Schema::dropIfExists('instamojo_payment');
51
    }
52
}
53