Blame view

console/migrations/m160128_101543_fields.php 748 Bytes
4253cbec   root   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
  <?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(),

              'language' => $this->string(3),

              'key' => $this->integer(),

              'parent_key' => $this->integer()

          ], $tableOptions);

  

      }

  

      public function down()

      {

          $this->dropTable('{{%fields}}');

      }

  }