Completed
Pull Request — master (#5)
by
unknown
24:10 queued 09:11
created

CreateSettingsTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
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
0 ignored issues
show
Deprecated Code introduced by
The class Arcanedev\Support\Bases\Migration has been deprecated with message: Use the `Arcanedev\Support\Database\Migration` instead.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
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