HtmlBlock   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 24 1
A down() 0 2 1
1
<?php
2
3
use Illuminate\Database\Schema\Blueprint;
4
use Illuminate\Database\Migrations\Migration;
5
6
class HtmlBlock extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        Schema::create('html_block', function (Blueprint $table) {
16
            $table->increments('id');
17
            $table->boolean('active')->default(false);
18
            $table->string('title')->nullable();
19
            $table->string('button_title')->nullable();
20
            $table->string('short_title')->nullable();
21
            $table->text('content')->nullable();
22
            $table->text('template')->nullable();
23
            $table->string('slug');
24
            $table->string('position')->nullable();
25
            $table->string('url')->nullable();
26
            $table->string('image_file_name')->nullable();
27
            $table->string('image_file_path')->nullable();
28
            $table->integer('image_file_size')->nullable();
29
            $table->string('image_file_extension')->nullable();
30
            $table->string('thumbnail_height')->nullable();
31
            $table->string('thumbnail_width')->nullable();            
32
            $table->integer('shop_id')->unsigned()->nullable();
33
            $table->foreign('shop_id')->references('id')->on('shop')->onDelete('cascade');
34
            $table->integer('modified_by_user_id')->unsigned()->nullable();
35
            $table->foreign('modified_by_user_id')->references('id')->on('user')->onDelete('set null');
36
            $table->timestamps();
37
        });
38
    }
39
40
    /**
41
     * Reverse the migrations.
42
     *
43
     * @return void
44
     */
45
    public function down()
46
    {
47
        //
48
    }
49
}
50