Passed
Push — develop ( a95732...cd40df )
by Septianata
12:51
created

anonymous//database/migrations/2021_05_22_000005_create_configurations_table.php$0   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A 2021_05_22_000005_create_configurations_table.php$0 ➔ down() 0 3 1
A 2021_05_22_000005_create_configurations_table.php$0 ➔ up() 0 9 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
/**
8
 * @see \App\Models\Configuration
9
 */
10
return new class extends Migration
11
{
12
    /**
13
     * Run the migrations.
14
     *
15
     * @return void
16
     */
17
    public function up()
18
    {
19
        Schema::create('configurations', function (Blueprint $table) {
20
            $table->id();
21
22
            $table->string('key')->unique();
23
            $table->string('value');
24
            $table->text('description')->nullable();
25
            $table->timestamps();
26
        });
27
    }
28
29
    /**
30
     * Reverse the migrations.
31
     *
32
     * @return void
33
     */
34
    public function down()
35
    {
36
        Schema::dropIfExists('configurations');
37
    }
38
};
39