Commit 31c39e98e5fb906b61408a5116650d2aa6ecb821
1 parent
51514d7d
add migration for change key Importers files
Showing
1 changed file
with
21 additions
and
0 deletions
Show diff stats
console/migrations/m150922_094313_change_key_ImportFiles.php
0 → 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +use yii\db\Schema; | |
| 4 | +use yii\db\Migration; | |
| 5 | + | |
| 6 | +class m150922_094313_change_key_ImportFiles extends Migration | |
| 7 | +{ | |
| 8 | + public function up() | |
| 9 | + { | |
| 10 | + $this->dropIndex('importer_id', '{{%importer_files}}'); | |
| 11 | + $this->createIndex('importer_id', '{{%importer_files}}', 'importer_id, upload_time', false); | |
| 12 | + } | |
| 13 | + | |
| 14 | + public function down() | |
| 15 | + { | |
| 16 | + $this->dropIndex('importer_id', '{{%importer_files}}'); | |
| 17 | + $this->createIndex('importer_id', '{{%importer_files}}', 'importer_id, time_start', false); | |
| 18 | + } | |
| 19 | + | |
| 20 | + | |
| 21 | +} | ... | ... |