CreateRakshakSettingsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 13 1
A down() 0 3 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
use Thinkstudeo\Rakshak\RakshakSetting;
7
8
class CreateRakshakSettingsTable extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        Schema::create('rakshak_settings', function (Blueprint $table) {
18
            $table->uuid('id');
19
            $table->boolean('enable_2fa')->default(false);
20
            $table->string('channel_2fa')->default('email');
21
            $table->string('control_level_2fa')->default('admin');
22
            $table->timestamps();
23
24
            $table->primary('id');
25
        });
26
27
        RakshakSetting::create();
28
    }
29
30
    /**
31
     * Reverse the migrations.
32
     *
33
     * @return void
34
     */
35
    public function down()
36
    {
37
        Schema::dropIfExists('rakshak_settings');
38
    }
39
}
40