<?php

use yii\db\Migration;

class m160509_121023_articles extends Migration
{
    public function up()
    {
        $this->createTable('articles', [
            'id' => $this->primaryKey(),
            'date'=> $this->date(),
            'title'=> $this->string()->notNull(),
            'body'=> $this->text()->notNull(),
            'image'=> $this->string()->notNull(),
            'translit'=> $this->string()->notNull(),
            'meta_title'=> $this->string(),
            'meta_keywords' => $this->string(),
            'meta_description'=> $this->string(),
            'seo_text'=> $this->text(),
            'h1'=> $this->string(),

        ]);
    }

    public function down()
    {
        $this->dropTable('articles');
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
