m170413_125133_rename_date_columns   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 4 1
A up() 0 4 1
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