Completed
Push — master ( 3b9644...b65440 )
by Zach
07:24 queued 02:31
created

CreateProjectsTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 31
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateProjectsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('projects', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('name')->unique()->index();
19
            $table->string('slug')->unique()->index();
20
            $table->string('type')->nullable()->index();
21
            $table->boolean('visible')->default(false);
22
            $table->integer('order');
23
            $table->timestamp('deleted_at')->nullable();
24
            $table->timestamps();
25
        });
26
    }
27
28
    /**
29
     * Reverse the migrations.
30
     *
31
     * @return void
32
     */
33
    public function down()
34
    {
35
        Schema::dropIfExists('projects');
36
    }
37
}
38