m180622_040024_drop_account_columns_from_media   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A safeUp() 0 4 1
A safeDown() 0 4 1
1
<?php
2
3
use yii\db\Migration;
4
5
/**
6
 * Class m180622_040024_drop_account_columns_from_media
7
 */
8
class m180622_040024_drop_account_columns_from_media extends Migration
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function safeUp()
14
    {
15
        $this->dropColumn('media', 'account_followed_by');
16
        $this->dropColumn('media', 'account_follows');
17
    }
18
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function safeDown()
23
    {
24
        $this->addColumn('media', 'account_followed_by', $this->integer());
25
        $this->addColumn('media', 'account_follows', $this->integer());
26
    }
27
}
28