<?php namespace TPS\Birzha\Updates;

use Schema;
use October\Rain\Database\Updates\Migration;

class BuilderTableUpdateTpsBirzhaProducts27 extends Migration
{
    public function up()
    {
        Schema::table('tps_birzha_products', function($table)
        {
            $table->dropColumn('mark');
            $table->dropColumn('quantity');
            $table->dropColumn('measure_id');
            $table->dropColumn('currency_id');
            $table->dropColumn('payment_term_id');
            $table->dropColumn('delivery_term_id');
            $table->dropColumn('packaging');
            $table->dropColumn('payment_id');
            $table->dropColumn('payed_fee_for_publ');
        });
    }
    
    public function down()
    {
        Schema::table('tps_birzha_products', function($table)
        {
            $table->string('mark', 191)->nullable();
            $table->decimal('quantity', 10, 2)->nullable();
            $table->integer('measure_id')->nullable();
            $table->integer('currency_id')->nullable();
            $table->integer('payment_term_id')->nullable();
            $table->integer('delivery_term_id')->nullable();
            $table->string('packaging', 191)->nullable();
            $table->integer('payment_id')->nullable();
            $table->decimal('payed_fee_for_publ', 10, 2)->nullable();
        });
    }
}
