Completed
Push — master ( a40fc9...4580d0 )
by ARCANEDEV
03:02
created

CreateSettingsTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 28
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A up() 0 8 1
1
<?php
2
3
use Arcanedev\Support\Bases\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
/**
7
 * Class     CreateSettingsTable
8
 *
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class CreateSettingsTable extends Migration
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Constructor
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    public function __construct()
18
    {
19
        $this->connection = config('settings.stores.database.connection');
20
        $this->table      = config('settings.stores.database.table');
21
    }
22
23
    /* ------------------------------------------------------------------------------------------------
24
     |  Main Functions
25
     | ------------------------------------------------------------------------------------------------
26
     */
27
    /**
28
     * Run the migrations.
29
     */
30
    public function up()
31
    {
32
        $this->createSchema(function(Blueprint $table) {
33
            $table->increments('id');
34
            $table->string('key')->index();
35
            $table->text('value');
36
        });
37
    }
38
}
39