<?php

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

class AddLandedCostToPrSupplierProducts extends Migration
{
    public function up()
    {
        Schema::table('pr_supplier_products', function (Blueprint $table) {
            $table->decimal('landed_unit_cost', 22, 4)->default(0)->after('converted_price_egp');
            $table->decimal('landed_unit_cost_egp', 22, 4)->default(0)->after('landed_unit_cost');
        });
    }

    public function down()
    {
        Schema::table('pr_supplier_products', function (Blueprint $table) {
            $table->dropColumn(['landed_unit_cost', 'landed_unit_cost_egp']);
        });
    }
}
