<?php

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

class AddColumn3InQuotTaxInvoiceTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('quot_tax_invoice', function (Blueprint $table) {
            $table->double('discount_percentage')->nullable();
            $table->double('subtotal')->nullable();
            $table->double('discount_amount')->nullable();
            $table->double('total_tax_amount')->nullable();
            $table->double('extra_charges_amount')->nullable();
            $table->bigInteger('billing_address_id')->nullable()->unsigned();
            $table->foreign('billing_address_id')->references('id')->on('client_address');
        });
    }

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