CreateLanguagesTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 9
rs 10
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