Users   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 18
c 2
b 0
f 0
dl 0
loc 29
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A change() 0 24 1
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class Users extends AbstractMigration
6
{
7
    /**
8
     * @author Ronan Chilvers <[email protected]>
9
     */
10
    public function change()
11
    {
12
        $table = $this->table('users', [
13
            'id' => 'user_id',
14
        ]);
15
        $table
16
            ->addColumn('user_email', 'string', [
17
                'length' => 1024,
18
                'null'   => false,
19
            ])
20
            ->addColumn('user_password', 'string', [
21
                'length' => 128,
22
                'null'   => false,
23
            ])
24
            ->addColumn('user_status', 'string', [
25
                'length'  => 24,
26
                'null'    => false,
27
            ])
28
            ->addColumn('user_preferences', 'text', [
29
                'null'    => true,
30
            ])
31
            ->addTimestamps('user_created', 'user_updated')
32
            ->addIndex(['user_email'])
33
            ->create();
34
    }
35
}
36