Completed
Push — master ( 193986...cdf399 )
by Andrey
11:47
created

m180618_133225_add_columns_to_contacts_table   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

1 Method

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