Completed
Push — master ( 7a5f39...3a2708 )
by ARCANEDEV
09:08
created

CreateTrackerErrorsTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
use Arcanedev\LaravelTracker\Bases\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
/**
7
 * Class     CreateTrackerErrorsTable
8
 *
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class CreateTrackerErrorsTable extends Migration
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Properties
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Table related to this migration.
19
     *
20
     * @var string
21
     */
22
    protected $table = 'errors';
23
24
    /* ------------------------------------------------------------------------------------------------
25
     |  Main Functions
26
     | ------------------------------------------------------------------------------------------------
27
     */
28
    /**
29
     * Migrate to database.
30
     */
31
    public function up()
32
    {
33
        $this->createSchema(function (Blueprint $table) {
34
            $table->bigIncrements('id');
35
            $table->string('code')->index();
36
            $table->string('message')->index();
37
            $table->timestamp('created_at')->index();
38
            $table->timestamp('updated_at')->index();
39
        });
40
    }
41
}
42