Completed
Pull Request — master (#13)
by
unknown
24:06 queued 09:01
created

m200630_144800_mfa_recovery_codes::safeUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 9.7998
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
use yii\db\Migration;
4
5
/**
6
 * Class m200630_144800_mfa_recovery_codes
7
 */
8
class m200630_144800_mfa_recovery_codes extends Migration
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function safeUp()
14
    {
15
        $this->createTable(
16
            '{{%mfa_recovery_codes}}',
17
            [
18
                'id' => $this->primaryKey(),
19
                'user_id' => $this->integer(11)->notNull(),
20
                'code' => $this->string(255),
21
            ],
22
            'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB'
23
        );
24
25
        return true;
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function safeDown()
32
    {
33
        $this->dropTable('{{%mfa_recovery_codes}}');
34
35
        return true;
36
    }
37
}
38