Blame view

console/migrations/m160128_101543_fields.php 719 Bytes
4668085e   Administrator   firs page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  <?php
  
  use yii\db\Migration;
  
  class m160128_101543_fields extends Migration
  {
      public function up()
      {
          $tableOptions = null;
  
          $this->createTable('{{%fields}}', [
              'id' => $this->primaryKey(),
              'table_name' => $this->string(255)->notNull(),
              'table_id' => $this->integer(),
              'value' => $this->string(255),
              'field_name' => $this->string(),
              'field_type' => $this->string(32)->notNull(),
70abf3e7   Administrator   add field v.1
18
19
20
              'language' => $this->string(3),
              'key' => $this->integer(),
              'parent_key' => $this->integer()
4668085e   Administrator   firs page
21
22
23
24
25
26
27
28
29
          ], $tableOptions);
  
      }
  
      public function down()
      {
          $this->dropTable('{{%fields}}');
      }
  }