<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddHppColumnsToSubstocktransactionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('substocktransactions', function (Blueprint $table) {
            $table->decimal('hpp_product', 20, 2)->nullable();
            $table->decimal('hpp_product_materials', 20, 2)->nullable();
            $table->decimal('hpp_product_finished', 20, 2)->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('substocktransactions', function (Blueprint $table) {
            $table->dropColumn([
                'hpp_product',
                'hpp_product_materials',
                'hpp_product_finished',
            ]);
        });
    }
}
