AddAuthorAndUrlBlogEtcPostsTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 3
dl 0
loc 5
rs 10
c 2
b 1
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
/**
8
 * Class AddAuthorAndUrlBlogEtcPostsTable.
9
 */
10
class AddAuthorAndUrlBlogEtcPostsTable extends Migration
11
{
12
    /**
13
     * Add author_email and author_website columns to Blog Etc comments table.
14
     */
15
    public function up(): void
16
    {
17
        Schema::table('blog_etc_comments', static function (Blueprint $table) {
18
            $table->string('author_email')->nullable();
19
            $table->string('author_website')->nullable();
20
        });
21
    }
22
23
    /**
24
     * Reverse the migrations.
25
     */
26
    public function down(): void
27
    {
28
        Schema::table('blog_etc_comments', static function (Blueprint $table) {
29
            $table->dropColumn('author_email');
30
            $table->dropColumn('author_website');
31
        });
32
    }
33
}
34