Completed
Push — master ( 9d35e1...a3c5b4 )
by Abdelrahman
01:31 queued 14s
created

CreateTestimonialsTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
use Illuminate\Support\Facades\Schema;
6
use Illuminate\Database\Schema\Blueprint;
7
use Illuminate\Database\Migrations\Migration;
8
9
class CreateTestimonialsTable extends Migration
10
{
11
    public function up()
12
    {
13
        Schema::create(config('rinvex.testimonials.tables.testimonials'), function (Blueprint $table) {
14
            // Columns
15
            $table->increments('id');
16
            $table->morphs('subject');
17
            $table->morphs('attestant');
18
            $table->boolean('is_approved')->default(false);
19
            $table->string('body')->nullable();
20
            $table->timestamps();
21
            $table->softDeletes();
22
        });
23
    }
24
25
    public function down()
26
    {
27
        Schema::dropIfExists(config('rinvex.testimonials.tables.testimonials'));
28
    }
29
}
30