Blame view

console/migrations/m171025_144147_addcolumn_customer.php 552 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 m171025_144147_addcolumn_customer extends Migration
  {
      public function safeUp()
      {
              $this->addColumn('order', 'secondname', $this->string());
      }
  
      public function safeDown()
      {
         $this->dropColumn('order', 'secondname');
      }
  
      /*
      // Use up()/down() to run migration code without a transaction.
      public function up()
      {
  
      }
  
      public function down()
      {
          echo "m171025_144147_addcolumn_customer cannot be reverted.\n";
  
          return false;
      }
      */
  }