<?php

use yii\db\Migration;

class m161228_142558_car extends Migration
{
    public function up()
    {
        $this->createTable('car', [
           'car_id' => $this->primaryKey(),
           'model' => $this->string(),
           'year' => $this->integer(),
           'image' => $this->string(),
           'color' => $this->string(),
           'mileage' => $this->double(),
           'build' => $this->string(),
           'option' => $this->text(),
           'price' => $this->double(),
        ]);
    }

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