Commit dd6fce495260f75154102515e0406ff938169514
1 parent
2fb5a757
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,7 +9,7 @@ use yii\grid\DataColumn; | ||
9 | /* @var $searchModel backend\models\CatalogSearch */ | 9 | /* @var $searchModel backend\models\CatalogSearch */ |
10 | /* @var $dataProvider yii\data\ActiveDataProvider */ | 10 | /* @var $dataProvider yii\data\ActiveDataProvider */ |
11 | 11 | ||
12 | -$this->title = 'Results'; | 12 | +$this->title = 'Проверка прайсов'; |
13 | $this->params['breadcrumbs'][] = $this->title; | 13 | $this->params['breadcrumbs'][] = $this->title; |
14 | ?> | 14 | ?> |
15 | <div class="catalog-index"> | 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 | +} |