Blame view

console/migrations/m160920_193159_add_sale_percent_to_event.php 563 Bytes
d81e27bb   Administrator   big commti
1
2
3
4
5
6
7
8
  <?php
  
  use yii\db\Migration;
  
  class m160920_193159_add_sale_percent_to_event extends Migration
  {
      public function up()
      {
573db3b2   Administrator   big commti
9
10
          $this->addColumn('event', 'sale', $this->boolean());
          $this->addColumn('event', 'percent', $this->integer(5));
d81e27bb   Administrator   big commti
11
12
13
14
      }
  
      public function down()
      {
573db3b2   Administrator   big commti
15
16
          $this->dropColumn('event', 'sale');
          $this->dropColumn('event', 'percent');
d81e27bb   Administrator   big commti
17
18
19
20
21
22
23
24
25
26
27
28
29
      }
  
      /*
      // Use safeUp/safeDown to run migration code within a transaction
      public function safeUp()
      {
      }
  
      public function safeDown()
      {
      }
      */
  }