Passed
Push — master ( 3d2565...6e288b )
by CodexShaper
04:16
created

CreateDBMTemplatesTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

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