Completed
Push — master ( 68aaed...46e6d9 )
by CodexShaper
05:40
created

CreateDBMFieldsTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 16
c 1
b 0
f 0
dl 0
loc 34
rs 10
wmc 2
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateDBMFieldsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('dbm_fields', function (Blueprint $table) {
17
            $table->bigIncrements('id');
18
            $table->bigInteger('dbm_object_id')->unsigned();
19
            $table->string('name');
20
            $table->string('display_name');
21
            $table->string('type')->nullable();
22
            $table->boolean('required')->default(false);
23
            $table->boolean('create')->default(true);
24
            $table->boolean('read')->default(true);
25
            $table->boolean('edit')->default(true);
26
            $table->boolean('delete')->default(true);
27
            $table->integer('order')->unsigned();
28
            $table->text('extra')->nullable();
29
            $table->timestamps();
30
        });
31
    }
32
33
    /**
34
     * Reverse the migrations.
35
     *
36
     * @return void
37
     */
38
    public function down()
39
    {
40
        Schema::dropIfExists('dbm_fields');
41
    }
42
}
43