Commit d4fe447d7fbcdae1c8d7ce7dd891ee6e1809e6ef

Authored by Administrator
1 parent 7a9b733d

upload project

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
console/migrations/m151109_085627_update_news_img.php
@@ -5,12 +5,12 @@ use yii\db\Migration; @@ -5,12 +5,12 @@ use yii\db\Migration;
5 5
6 class m151109_085627_update_news_img extends Migration 6 class m151109_085627_update_news_img extends Migration
7 { 7 {
8 - public function saveUp() 8 + public function safeUp()
9 { 9 {
10 $view = <<< MySQL 10 $view = <<< MySQL
11 update 11 update
12 - italautocomua.w_news  
13 - set img = CONCAT('/storage/news/',img) 12 + w_news
  13 + set img = CONCAT('/storage/news/',img);
14 MySQL; 14 MySQL;
15 $this->execute($view); 15 $this->execute($view);
16 16
@@ -20,7 +20,7 @@ MySQL; @@ -20,7 +20,7 @@ MySQL;
20 { 20 {
21 echo "m151109_085627_update_news_img cannot be reverted.\n"; 21 echo "m151109_085627_update_news_img cannot be reverted.\n";
22 22
23 - return false; 23 + return true;
24 } 24 }
25 25
26 /* 26 /*