Blame view

console/migrations/m150922_094313_change_key_ImportFiles.php 754 Bytes
642796c8   Mihail   merge with server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  <?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);
      }
  
  
  }