Blame view

console/migrations/m160204_151615_cities.php 475 Bytes
be426331   Administrator   add Vitaliy's wid...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  <?php
  
  use yii\db\Migration;
  
  class m160204_151615_cities extends Migration
  {
      public function up()
      {
          $tableOptions = null;
  
          $this->createTable('{{%cities}}', [
              'id' => $this->primaryKey(),
              'name' => $this->string(255),
              'is_active' => $this->smallInteger(),
              'parent' => $this->integer()
          ], $tableOptions);
  
      }
  
      public function down()
      {
          $this->dropTable('{{%cities}}');
      }
  }