Passed
Push — master ( ef93dc...4f7931 )
by
unknown
13:58
created

CreateLaravelSmsLogTable::up()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 9.7998
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateLaravelSmsLogTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        if (!Schema::hasTable('laravel_sms_log')) {
17
18
            Schema::create('laravel_sms_log', function (Blueprint $table) {
19
                $table->increments('id');
20
                $table->string('mobile');
21
                $table->string('data');
22
                $table->tinyInteger('is_sent')->default(0);
23
                $table->text('result')->nullable();
24
                $table->timestamps();
25
            });
26
        }
27
    }
28
29
    /**
30
     * Reverse the migrations.
31
     *
32
     * @return void
33
     */
34
    public function down()
35
    {
36
        Schema::dropIfExists('laravel_sms_log');
37
    }
38
}
39