Blame view

common/modules/language/migrations/m160829_104745_create_table_language.php 1.04 KB
d8c1a2e0   Yarik   Big commit artbox
1
  <?php
5c2eb7c8   Yarik   Big commit almost...
2
3
4
5
      
      use yii\db\Migration;
      
      class m160829_104745_create_table_language extends Migration
d8c1a2e0   Yarik   Big commit artbox
6
      {
5c2eb7c8   Yarik   Big commit almost...
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
          
          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}}');
          }
d8c1a2e0   Yarik   Big commit artbox
32
      }