<?php

use yii\db\Migration;

/**
 * Handles the creation of table `{{%product}}`.
 */
class m231012_102916_create_product_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->createTable('{{%product}}', [
            'id' => $this->primaryKey(),
            'type' => $this->tinyInteger(),
            'name' => $this->string(),
            'description' => $this->string(),
            'price' => $this->float(),
            'status' => $this->tinyInteger(),
            'quantity' => $this->integer(),
            'taste' => $this->string(),
            'strength' => $this->tinyInteger()
        ]);
    }

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