Commit 56f745967b22a9ee376d857a7e95805c2d5ca7df
1 parent
dd60c760
add migration for changing data price in Importer table
Showing
2 changed files
with
22 additions
and
1 deletions
Show diff stats
backend/views/parser/checkPrice.php
| ... | ... | @@ -9,7 +9,7 @@ use yii\grid\DataColumn; |
| 9 | 9 | /* @var $searchModel backend\models\CatalogSearch */ |
| 10 | 10 | /* @var $dataProvider yii\data\ActiveDataProvider */ |
| 11 | 11 | |
| 12 | -$this->title = 'Results'; | |
| 12 | +$this->title = 'Проверка прайсов'; | |
| 13 | 13 | $this->params['breadcrumbs'][] = $this->title; |
| 14 | 14 | ?> |
| 15 | 15 | <div class="catalog-index"> | ... | ... |
console/migrations/m150922_144040_change_Importer_dataPrice.php
0 → 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +use yii\db\Schema; | |
| 4 | +use yii\db\Migration; | |
| 5 | + | |
| 6 | +class m150922_144040_change_Importer_dataPrice extends Migration | |
| 7 | +{ | |
| 8 | + public function up() | |
| 9 | + { | |
| 10 | + $this->alterColumn('{{%importer}}','price_date_update','TIMESTAMP' ); | |
| 11 | + $this->createIndex('price_date', '{{%importer}}', 'price_date_update', false); | |
| 12 | + } | |
| 13 | + | |
| 14 | + public function down() | |
| 15 | + { | |
| 16 | + $this->alterColumn('{{%importer}}','price_date','varchar(15)' ); | |
| 17 | + $this->dropIndex('price_date', '{{%importer}}'); | |
| 18 | + } | |
| 19 | + | |
| 20 | + | |
| 21 | +} | ... | ... |