<?php

use yii\db\Migration;

/**
 * Handles the creation of table `page`.
 */
class m170402_140014_create_page_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->createTable('page', [
            'id' => $this->primaryKey(),
            'in_menu'=> $this->boolean()->notNull()->defaultValue(false),
            'sort' =>
            $this->integer()
                 ->defaultValue(0),
            'gallery' => $this->string()
        ]);
    }

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