Blame view

common/modules/language/migrations/m160829_104745_create_table_language.php 1.14 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
          
          public function up()
          {
8af13427   Yarik   For leha commit.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
              $this->createTable(
                  '{{%language}}',
                  [
                      'id' => $this->primaryKey(),
                      'url'         => $this->string()
                                            ->notNull(),
                      'local'       => $this->string()
                                            ->notNull(),
                      'name'        => $this->string()
                                            ->notNull(),
                      'default'     => $this->boolean()
                                            ->notNull()
                                            ->defaultValue(false),
                      'created_at'  => $this->integer()
                                            ->notNull(),
                      'updated_at'  => $this->integer()
                                            ->notNull(),
                  ]
              );
5c2eb7c8   Yarik   Big commit almost...
29
30
31
32
33
34
          }
          
          public function down()
          {
              $this->dropTable('{{%language}}');
          }
d8c1a2e0   Yarik   Big commit artbox
35
      }