Passed
Push — master ( 5d9325...8a350f )
by Curtis
11:22
created

CreateDefaultPeopleTable::up()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 25
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 16
nc 2
nop 0
dl 0
loc 25
rs 9.7333
c 0
b 0
f 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
return new class extends Migration
8
{
9
    public function up()
10
    {
11
        if (!Schema::hasTable('people')) {
12
            Schema::create('people', function (Blueprint $table) {
13
                $table->increments('id');
14
15
                $table->tinyInteger('title')->nullable();
16
                $table->string('name')->index();
17
                $table->string('appellative')->index()->nullable();
18
19
                $table->string('uid')->nullable()->unique();
20
                $table->string('email')->unique()->nullable();
21
                $table->string('phone')->nullable();
22
                $table->string('birthday')->nullable();
23
24
                $table->string('bank')->nullable();
25
                $table->string('bank_account')->nullable();
26
27
                $table->text('obs')->nullable();
28
29
                $table->integer('created_by')->unsigned()->index()->nullable();
30
31
                $table->integer('updated_by')->unsigned()->index()->nullable();
32
33
                $table->timestamps();
34
            });
35
        }
36
    }
37
38
    public function down()
39
    {
40
        Schema::dropIfExists('people');
41
    }
42
}
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected EOF, expecting ';' on line 42 at column 0
Loading history...
43