Blame view

common/modules/language/migrations/m160829_104745_create_table_language.php 664 Bytes
4ca21c3e   Alexey Boroda   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
  <?php
  
  use yii\db\Migration;
  
  class m160829_104745_create_table_language extends Migration
  {
      public function up()
      {
          $this->createTable('{{%language}}', [
              'language_id' => $this->primaryKey(),
              'url' => $this->string()->notNull(),
              'local' => $this->string()->notNull(),
              'name' => $this->string()->notNull(),
              'default' => $this->boolean()->notNull()->defaultValue(false),
              'date_create' => $this->integer()->notNull(),
              'date_update' => $this->integer()->notNull(),
          ]);
      }
  
      public function down()
      {
          $this->dropTable('{{%language}}');
      }
  }