CreateContentTypeTextsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 12 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateContentTypeTextsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     */
12
    public function up()
13
    {
14
        Schema::create('content_type_texts', function (Blueprint $table) {
15
            $table->bigIncrements('id');
16
            $table->nullableMorphs('linkable');
17
            $table->string('locale', 5);
18
            $table->string('group', 75)->nullable();
19
            $table->string('key', 75)->nullable();
20
            $table->longText('value')->nullable();
21
            $table->timestamps();
22
            $table->softDeletes();
23
            $table->unique(['linkable_type', 'linkable_id', 'locale', 'group', 'key']);
24
        });
25
    }
26
27
    /**
28
     * Reverse the migrations.
29
     */
30
    public function down()
31
    {
32
        Schema::dropIfExists('content_type_texts');
33
    }
34
}
35