<?php

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

class AddColumnInPoPaymentDetailsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('po_payment_details', function (Blueprint $table) {
            $table->bigInteger('po_receipt_voucher_id')->nullable()->unsigned();
            $table->foreign('po_receipt_voucher_id')->references('id')->on('po_receipt_voucher');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('po_payment_details', function (Blueprint $table) {
            //
        });
    }
}
