CreateTestimonialsTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
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 CreateTestimonialsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('testimonials', function (Blueprint $table) {
17
            $table->id();
18
            $table->foreignId('country_id')->constrained();
19
20
            $table->string('name');
21
            $table->string('surname');
22
            $table->string('profession')->nullable();
23
            $table->text('feedback_short')->nullable();
24
            $table->text('feedback');
25
            $table->string('photo')->nullable();
26
27
            $table->boolean('personal_data_agreement');
28
            $table->boolean('publish_agreement');
29
30
            $table->string('slug');
31
            $table->timestamps();
32
        });
33
    }
34
35
    /**
36
     * Reverse the migrations.
37
     *
38
     * @return void
39
     */
40
    public function down()
41
    {
42
        Schema::dropIfExists('testimonials');
43
    }
44
}
45