Completed
Push — master ( a0562a...bb771d )
by Dmitry
04:04
created

m170424_144100_package_avoiding   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 6 1
A down() 0 4 1
1
<?php
2
3
namespace hiqdev\assetpackagist\migrations;
4
5
use yii\db\Migration;
6
7
/**
8
 * Migration for packages avoiding
9
 *
10
 * @author Dmytro Naumenko <[email protected]>
11
 */
12
class m170424_144100_package_avoiding extends Migration
13
{
14
    public function up()
15
    {
16
        $this->addColumn('package', 'is_avoided', $this->boolean()->defaultExpression('false'));
17
18
        $this->createIndex('package-is_avoided-idx', 'package', 'is_avoided');
19
    }
20
21
    public function down()
22
    {
23
        $this->dropColumn('package', 'is_avoided');
24
    }
25
}
26