<?php

use yii\db\Migration;

class m161228_143104_emails extends Migration
{
    public function up()
    {
        $this->createTable('emails', [
            'id' => $this->primaryKey(),
            'username' => $this->string(),
            'email' => $this->string(),
            'phone' => $this->string(),
            'message' => $this->text(),
            'date_from' => $this->integer(),
            'date_to' => $this->integer(),
            'date_count' => $this->integer(),
        ]);
    }

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