<?php

use yii\db\Schema;
use yii\db\Migration;
use common\models\Product;

class m150924_162425_alter__table__product_fix_columns extends Migration
{
    public function up()
    {
		$this->renameColumn('product','id_product_type','id_product_category');
		$this->addColumn('product','stock',  'int(11)' );
    }

    public function down()
    {
        echo "m150924_162425_alter__table__product_fix_columns cannot be reverted.\n";

        return false;
    }

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

    public function safeDown()
    {
    }
    */
}
