Passed
Push — master ( 36be2d...32b990 )
by Carlos
02:58
created

m130101_000001_user::getTableName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
class m130101_000001_user extends \roaresearch\yii2\migrate\CreateTableMigration
4
{
5
    public function getTableName(): string
6
    {
7
        return 'user';
8
    }
9
10
    public function columns(): array
11
    {
12
        return [
13
            'id' => $this->primaryKey(),
14
            'username' => $this->string()->notNull()->unique(),
15
            'auth_key' => $this->string(32)->notNull(),
16
            'password_hash' => $this->string()->notNull(),
17
            'password_reset_token' => $this->string()->unique(),
18
        ];
19
    }
20
}
21