CreateSeoTables::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 10
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 12
rs 9.9332
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateSeoTables extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create('seo_meta', function (Blueprint $table) {
12
            $table->bigIncrements('id');
13
            $table->bigInteger('object_id')->nullable();
14
            $table->string('slug')->unique();
15
            $table->string('type');
16
            $table->string('title')->nullable();
17
            $table->string('description')->nullable();
18
            $table->timestamps();
19
            $table->index('slug');
20
            $table->index('type');
21
        });
22
    }
23
24
    public function down()
25
    {
26
        Schema::drop('seo_meta');
27
    }
28
}
29