Completed
Push — master ( e1cce4...d2c19b )
by David
09:34 queued 11s
created

CreateNewsTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 17
rs 9.7
c 0
b 0
f 0
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