Blame view

console/migrations/blog/m161101_142334_blog_article.php 779 Bytes
c400c367   Alexey Boroda   -Blog ready
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
30
31
  <?php
  
  use yii\db\Migration;
  
  class m161101_142334_blog_article extends Migration
  {
      public function up()
      {
          /**
           * Create main table with blog's articles
           */
          $this->createTable(
              'blog_article',
              [
                  'id'         => $this->primaryKey(),
                  'image'      => $this->string(255),
                  'created_at' => $this->integer(),
                  'updated_at' => $this->integer(),
                  'deleted_at' => $this->integer(),
                  'sort'       => $this->integer(),
                  'status'     => $this->boolean(),
                  'author_id'  => $this->integer(),
              ]
          );
      }
  
      public function down()
      {
          $this->dropTable('blog_article');
      }
  }