hauntd/yii2-vote

View on GitHub
migrations/m160706_223457_vote_index.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

use hauntd\vote\migrations\Migration;

/**
 * @author Alexander Kononenko <contact@hauntd.me>
 */
class m160706_223457_vote_index extends Migration
{
    public function up()
    {
        $this->createIndex('vote_target_value_idx', '{{%vote}}', ['entity', 'target_id', 'value'], false);
    }

    public function down()
    {
        $this->dropIndex('vote_target_value_idx', '{{%vote}}');
    }
}