Blame view

console/migrations/m180607_084335_create_author_table.php 912 Bytes
0060a4ca   Anastasia   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  <?php
  
  use yii\db\Migration;
  
  /**
   * Handles the creation of table `author`.
   */
  class m180607_084335_create_author_table extends Migration
  {
      /**
       * {@inheritdoc}
       */
      public function safeUp()
      {
          $this->createTable('author', [
              'id' => $this->primaryKey(),
8f340aa7   Anastasia   - main page
17
18
19
20
21
22
23
24
25
26
27
              'name' => $this->string(),
              'secondname' => $this->string(),
              'email' => $this->string(),
              'phone' => $this->string(),
              'password_hash' => $this->string(),
              'password_reset_token' => $this->string(),
              'auth_key' => $this->string(),
              'created_at' => $this->integer(),
              'updated_at' => $this->integer(),
              'about' => $this->text(),
              'status' => $this->integer()
0060a4ca   Anastasia   first commit
28
29
30
31
32
33
34
35
36
37
38
          ]);
      }
  
      /**
       * {@inheritdoc}
       */
      public function safeDown()
      {
          $this->dropTable('author');
      }
  }