Passed
Push — main ( 6877e3...35b0cf )
by PRATIK
04:14
created

CreateTestimonialsTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 14
nc 1
nop 0
dl 0
loc 16
rs 9.7998
c 1
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->string('code')->unique();
19
            $table->string('name');
20
            $table->string('image')->nullable();
21
            $table->string('email')->unique();
22
            $table->bigInteger('contact')->nullable();
23
            $table->string('designation')->nullable();
24
            $table->string('company')->nullable();
25
            $table->text('body');
26
            $table->integer('rating')->default(5);
27
            $table->bigInteger('position')->default(1);
28
            $table->boolean('approve')->default(1);
29
            $table->timestamps();
30
        });
31
    }
32
33
    /**
34
     * Reverse the migrations.
35
     *
36
     * @return void
37
     */
38
    public function down()
39
    {
40
        Schema::dropIfExists('testimonials');
41
    }
42
}
43