<?php

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

class AddDefaultValueInvoices extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('invoices', function (Blueprint $table) {
            $table->string('buyer_company', 50)->default('')->change();
            $table->string('reg_no', 100)->default('')->change();
            $table->string('address', 120)->default('')->change();
            $table->string('contact_no', 20)->default('')->change();
            $table->string('po_number', 20)->default('')->change();
            $table->string('order_no', 20)->default('')->change();
            $table->float('tax_rate')->default(0)->change();
            $table->float('billing_charge_rate')->default(0)->change();
            $table->string('invoice_path')->default('')->change();
            $table->float('amount')->default(0)->change();
        });
    }

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