CreateNewsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 17 1
A down() 0 4 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 CreateNewsTable extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create('duck_funk_news', function (Blueprint $table) {
12
            $table->bigIncrements('id');
13
            $table->string('title', 155);
14
            $table->string('subtitle', 255);
15
            $table->text('body');
16
            $table->json('categories')->nullable();
17
            $table->string('image_link', 255)->nullable();
18
            $table->integer('hotelview_news_id')->default(null)->nullable();
19
            $table->boolean('draft')->default(false);
20
            $table->unsignedBigInteger('author');
21
            $table->timestamps();
22
            $table->timestamp('published_at')->nullable();
23
            $table->softDeletes();
24
        });
25
    }
26
27
    public function down()
28
    {
29
        Schema::drop('duck_funk_news');
30
    }
31
}
32