Passed
Push — master ( 216e85...786672 )
by Nasrul Hazim
03:34
created

CreateCountriesTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 8 1
A down() 0 3 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateCountriesTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     */
12
    public function up()
13
    {
14
        Schema::create('countries', function (Blueprint $table) {
15
            $table->increments('id');
16
            $table->string('code');
17
            $table->label();
18
            $table->name();
19
            $table->timestamps();
20
        });
21
    }
22
23
    /**
24
     * Reverse the migrations.
25
     */
26
    public function down()
27
    {
28
        Schema::dropIfExists('countries');
29
    }
30
}
31