Blame view

console/migrations/m161021_094522_seo_to_blog_migration.php 690 Bytes
f2acc393   Alexey Boroda   -Seo widget integ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  <?php
  
  use yii\db\Migration;
  
  class m161021_094522_seo_to_blog_migration extends Migration
  {
      public function up()
      {
          $this->addColumn('blog_category', 'meta_title', $this->string(255));
          $this->addColumn('blog_category', 'meta_desc', $this->string(255));
          $this->addColumn('blog_category', 'seo_text', $this->string(255));
          $this->addColumn('blog_category', 'h1', $this->string(255));
      }
  
      public function down()
      {
          $this->dropColumn('blog_category', 'h1');
          $this->dropColumn('blog_category', 'seo_text');
          $this->dropColumn('blog_category', 'meta_desc');
          $this->dropColumn('blog_category', 'meta_title');
      }
  }