Completed
Push — master ( e68441...354a44 )
by Vincenzo
02:20
created

M1477152226CreateUsersTable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 13 1
1
<?php
2
3
4
use App\Lib\Slime\Interfaces\DatabaseHelpers\DbHelperInterface;
5
use Illuminate\Database\Capsule\Manager as Capsule;
6
use \Illuminate\Database\Schema\Blueprint as Blueprint;
7
8
class M1477152226CreateUsersTable implements DbHelperInterface
9
{
10
11
    public function run()
12
    {
13
        $tableName = 'users';
14
        Capsule::schema()->dropIfExists($tableName);
15
        Capsule::schema()->create($tableName, function (Blueprint $table) {
16
            $table->increments('id');
17
            $table->string('name');
18
            $table->string('surname');
19
            $table->string('email');
20
            $table->tinyInteger('age');
21
            $table->timestamps();
22
        });
23
    }
24
25
}