m170330_153158_remove_usernames   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 3 1
A down() 0 6 1
1
<?php
2
3
use yii\db\Migration;
4
5
class m170330_153158_remove_usernames extends Migration
6
{
7
    public function up()
8
    {
9
        $this->dropColumn("{{%user}}", "username");
10
    }
11
12
    public function down()
13
    {
14
        echo "m170330_153158_remove_usernames cannot be reverted.\n";
15
        echo "Usernames are all gone.\n";
16
17
        return false;
18
    }
19
20
    /*
21
    // Use safeUp/safeDown to run migration code within a transaction
22
    public function safeUp()
23
    {
24
    }
25
26
    public function safeDown()
27
    {
28
    }
29
    */
30
}
31