Passed
Push — master ( 5c9089...a37889 )
by Georgi
05:25
created

CreateCommondataTable::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateCommondataTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('commondata', function (Blueprint $table) {
17
            $table->bigIncrements('id');            
18
            $table->nestedSet();
19
            
20
            $table->string('key', 64);
21
            $table->text('value')->nullable();
22
            $table->integer('position')->nullable()->default(0);
23
            $table->smallInteger('readonly')->nullable()->default(0);
24
        });
25
    }
26
27
    /**
28
     * Reverse the migrations.
29
     *
30
     * @return void
31
     */
32
    public function down()
33
    {
34
        Schema::dropIfExists('commondata');
35
    }
36
}
37