Completed
Push — master ( f28199...0181a0 )
by Faith
13:38
created

CreateTemplatesTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 12
Ratio 100 %

Importance

Changes 0
Metric Value
dl 12
loc 12
rs 9.8666
c 0
b 0
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 View Code Duplication
class CreateTemplatesTable extends Migration
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('fg_templates', function (Blueprint $table) {
17
            $table->string('id')->index();
18
            $table->string('name')->unique();
19
            $table->string('branch')->unique();
20
            $table->string('repository');
21
            $table->text('description')->nullable();
22
            $table->boolean('active')->default(true);
23
            $table->timestamps();
24
        });
25
    }
26
27
    /**
28
     * Reverse the migrations.
29
     *
30
     * @return void
31
     */
32
    public function down()
33
    {
34
        Schema::dropIfExists('fg_templates');
35
    }
36
}
37