Blame view

console/migrations/m170620_093957_order_add_ip.php 649 Bytes
950817c6   Alex Savenko   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  <?php
      
      use yii\db\Migration;
      
      class m170620_093957_order_add_ip extends Migration
      {
          public function safeUp()
          {
              $this->addColumn('order', 'ip', $this->string());
          }
          
          public function safeDown()
          {
              $this->dropColumn('order', 'ip');
          }
          
          /*
          // Use up()/down() to run migration code without a transaction.
          public function up()
          {
      
          }
      
          public function down()
          {
              echo "m170620_093957_order_add_ip cannot be reverted.\n";
      
              return false;
          }
          */
      }