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

M1477152226CreateUsersTable::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 10
nc 1
nop 0
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
}