CreateMtnMomoTokensTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 15 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateMtnMomoTokensTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     */
12
    public function up()
13
    {
14
        Schema::create('mtn_momo_tokens', function (Blueprint $table) {
15
            $table->increments('id');
16
            $table->text('access_token');
17
            $table->text('refresh_token')->nullable();
18
            $table->string('token_type')->default('Bearer');
19
            $table->enum('product', [
20
                'collection',
21
                'disbursement',
22
                'remittance',
23
            ]);
24
            $table->timestamps();
25
            $table->timestamp('expires_at')->nullable();
26
            $table->softDeletes();
27
        });
28
    }
29
30
    /**
31
     * Reverse the migrations.
32
     */
33
    public function down()
34
    {
35
        Schema::drop('mtn_momo_tokens');
36
    }
37
}
38