CreateLanguagesTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 9 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
/**
8
 * Class CreateLanguagesTable
9
 */
10
class CreateLanguagesTable extends Migration
11
{
12
    /**
13
     * Run the migrations.
14
     * @return void
15
     */
16
    public function up()
17
    {
18
        Schema::create('languages', function (Blueprint $table) {
19
            $table->bigIncrements('id')->primaryKey();
20
            $table->string('locale', 8);
21
            $table->string('short_name', 3);
22
            $table->string('name', 64);
23
            $table->unsignedTinyInteger('default')->default(0);
24
            $table->timestamps();
25
        });
26
    }
27
28
    /**
29
     * Reverse the migrations.
30
     * @return void
31
     */
32
    public function down()
33
    {
34
        Schema::dropIfExists('languages');
35
    }
36
}
37