Passed
Push — master ( 051f8c...0effca )
by Daniel
02:41
created

CreateOtpsTable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A up() 0 12 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 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
}