Completed
Push — master ( f65d8f...4f3de5 )
by Pavel
04:14 queued 01:54
created

CreateUsersTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 14
nc 1
nop 0
dl 0
loc 19
rs 9.4285
c 0
b 0
f 0
1
<?php
2
use Illuminate\Database\Capsule\Manager as Capsule;
3
4
class CreateUsersTable
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
5
{
6
    /**
7
    * Do the migration
8
    */
9
    public function up()
10
    {
11
        Capsule::schema()->create('users', function($table)
12
        {
13
            $table->increments('id');
14
            $table->string('email')->unique();
15
            $table->string('full_name');
16
            $table->string('password');
17
            $table->string('access_token')->unique()->nullable();
18
            $table->string('password_reset_token')->nullable();
19
            $table->integer('role_id');
20
            $table->integer('created_by');
21
            $table->integer('updated_by')->nullable();
22
            $table->timestamps();
23
            $table->softDeletes();
24
            $table->integer('status');
25
        });
26
27
    }
28
29
    /**
30
    * Undo the migration
31
    */
32
    public function down()
33
    {
34
        Capsule::schema()->drop('users');
35
    }
36
}
37