CreateOtpsTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 10
nc 1
nop 0
dl 0
loc 12
rs 9.9332
c 0
b 0
f 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 CreateOtpsTable extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create('otps', function (Blueprint $table) {
12
            $table->id();
13
            $table->string('identifier');
14
            $table->string('token');
15
            $table->integer('validity');
16
            $table->boolean('expired')->default(false);
17
            $table->integer('no_times_generated')->default(0);
18
            $table->integer('no_times_attempted')->default(0);
19
            $table->timestamp('generated_at');
20
            $table->timestamps();
21
        });
22
    }
23
}