m170413_125133_rename_date_columns::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
use yii\db\Migration;
4
5
class m170413_125133_rename_date_columns extends Migration
6
{
7
    public function up()
8
    {
9
        $this->renameColumn('{{%setting}}', 'createdAt', 'created_at');
10
        $this->renameColumn('{{%setting}}', 'updatedAt', 'updated_at');
11
    }
12
13
    public function down()
14
    {
15
        $this->renameColumn('{{%setting}}', 'created_at', 'createdAt');
16
        $this->renameColumn('{{%setting}}', 'updated_at', 'updatedAt');
17
    }
18
19
    /*
20
    // Use safeUp/safeDown to run migration code within a transaction
21
    public function safeUp()
22
    {
23
    }
24
25
    public function safeDown()
26
    {
27
    }
28
    */
29
}
30