Blame view

console/migrations/m160202_094943_user_info_country_city.php 598 Bytes
51e0a262   Yarik   test
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
  <?php
  
  use yii\db\Schema;
  use yii\db\Migration;
  
  class m160202_094943_user_info_country_city extends Migration
  {
      public function up()
      {
          $this->addColumn('user_info', 'country', $this->string(255));
          $this->addColumn('user_info', 'city', $this->string(255));
      }
  
      public function down()
      {
          $this->dropColumn('user_info', 'country');
          $this->dropColumn('user_info', 'city');
      }
  
      /*
      // Use safeUp/safeDown to run migration code within a transaction
      public function safeUp()
      {
      }
  
      public function safeDown()
      {
      }
      */
  }