Blame view

console/migrations/m160929_141228_columns_for_page_table.php 443 Bytes
b224f0ae   Alexey Boroda   Changes:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  <?php
  
  use yii\db\Migration;
  
  class m160929_141228_columns_for_page_table extends Migration
  {
      public function up()
      {
          $this->addColumn('page', 'in_top_menu', $this->boolean()->defaultValue(false));
          $this->addColumn('page', 'sort_order', $this->integer()->defaultValue(1));
      }
  
      public function down()
      {
          $this->dropColumn('page', 'in_top_menu');
          $this->dropColumn('page', 'sort_order');
      }
  }