Passed
Push — master ( 6b49ff...b93f48 )
by Paweł
05:24
created

m180621_185704_drop_columns_from_proxy   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

2 Methods

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