m180607_084335_create_author_table.php 912 Bytes
<?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(),
            '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()
        ]);
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropTable('author');
    }
}