AddShortDescTextreaToBlogEtc   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 4 1
A up() 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
// (ignore typo! Don't want to change in case it breaks some people's migrations!)
8
9
/**
10
 * Class AddShortDescTextreaToBlogEtc.
11
 */
12
class AddShortDescTextreaToBlogEtc extends Migration
13
{
14
    /**
15
     * Create the DB table changes to add TEXT short_description column.
16
     */
17
    public function up(): void
18
    {
19
        Schema::table('blog_etc_posts', static function (Blueprint $table) {
20
            $table->text('short_description')->nullable();
21
        });
22
    }
23
24
    /**
25
     * Reverse the migrations.
26
     */
27
    public function down(): void
28
    {
29
        Schema::table('blog_etc_posts', static function (Blueprint $table) {
30
            $table->dropColumn('short_description');
31
        });
32
    }
33
}
34