Passed
Push — master ( bcfa32...be1ad5 )
by Alexander
02:28
created

migrations/m160706_223457_vote_index.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
use hauntd\vote\migrations\Migration;
4
5
/**
6
 * @author Alexander Kononenko <[email protected]>
7
 */
8
class m160706_223457_vote_index extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
9
{
10
    public function up()
11
    {
12
        $this->createIndex('vote_target_value_idx', '{{%vote}}', ['entity', 'target_id', 'value'], false);
13
    }
14
15
    public function down()
16
    {
17
        $this->dropIndex('vote_target_value_idx', '{{%vote}}');
18
    }
19
}
20