CreateMobilpayTransactionTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
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 CreateMobilpayTransactionTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('mobilpay_transactions', function (Blueprint $table) {
17
            $table->bigIncrements('id');
18
            $table->char('id_transaction')->nullable();
19
            $table->char('token_id')->nullable();
20
            $table->char('token_expiration_date')->nullable();
21
            $table->char('type')->nullable()->comment('person - payer is a person; company - payer is a company;');
22
            $table->integer('request_status')->default(0)->comment('0-order sent by client 1- order ok returned by mobilpay 2- order with errors returned by mobilpay');
23
            $table->text('status')->nullable();
24
            $table->text('value')->nullable();
25
            $table->text('currency')->nullable();
26
            $table->text('promotion_code')->nullable();
27
            $table->integer('installments_number')->nullable();
28
            $table->integer('installment_number')->nullable();
29
            $table->text('details')->nullable();
30
            $table->text('client_name')->nullable();
31
            $table->text('client_surname')->nullable();
32
            $table->text('client_fiscal_number')->nullable();
33
            $table->text('client_identity_number')->nullable();
34
            $table->text('client_country')->nullable();
35
            $table->text('client_county')->nullable();
36
            $table->text('client_city')->nullable();
37
            $table->text('client_zip_code')->nullable();
38
            $table->text('client_address')->nullable();
39
            $table->text('client_email')->nullable();
40
            $table->text('client_phone')->nullable();
41
            $table->text('client_bank')->nullable();
42
            $table->text('client_iban')->nullable();
43
            $table->text('request_object')->nullable()->comment('data we send to mobilpay');
44
            $table->text('return_request_object')->nullable()->comment('data we receive from mobilpay');
45
            $table->longText('custom_data')->nullable()->comment('insert here what other data you need');
46
            $table->timestamps();
47
        });
48
    }
49
50
    /**
51
     * Reverse the migrations.
52
     *
53
     * @return void
54
     */
55
    public function down()
56
    {
57
        Schema::dropIfExists('mobilpay_transactions');
58
    }
59
}
60