m150922_094313_change_key_ImportFiles.php
754 Bytes
<?php
use yii\db\Schema;
use yii\db\Migration;
class m150922_094313_change_key_ImportFiles extends Migration
{
//@todo вероятно что эта миграция ненужна - посмотреть ближе к концу проекта на ключи которые используются - остальные удалить.
public function up()
{
$this->dropIndex('importer_id', '{{%importer_files}}');
$this->createIndex('importer_id', '{{%importer_files}}', 'importer_id, upload_time', false);
}
public function down()
{
$this->dropIndex('importer_id', '{{%importer_files}}');
$this->createIndex('importer_id', '{{%importer_files}}', 'importer_id, time_start', false);
}
}