CreateMtnMomoTokensTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 12
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 15
rs 9.8666
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