Commit 3edb729ec4dd5b32937b188a6a8d31b923dc7bd0
1 parent
9dd0fbe4
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 | +} | ... | ... |