<?php

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

class MakeNullableFieldBookingsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('bookings', function (Blueprint $table) {
            $table->decimal('rmb_book_amount',9,3)->nullable()->change();
            $table->string('rmb_book_pay_method')->nullable()->change();
            $table->string('rmb_book_account_name')->nullable()->change();
            $table->string('rmb_book_bank_name')->nullable()->change();
            $table->string('rmb_book_acc_no')->nullable()->change();
            $table->string('rmb_book_bank_branch')->nullable()->change();

            $table->decimal('usd_book_amount', 9,3)->nullable()->change();
            $table->string('usd_book_pay_method')->nullable()->change();
            $table->string('usd_book_company_name')->nullable()->change();
            $table->string('usd_book_company_address')->nullable()->change();
            $table->string('usd_book_swift_code')->nullable()->change();
            $table->string('usd_book_cnap')->nullable()->change();
            $table->string('usd_book_bank_branch')->nullable()->change();
            $table->boolean('verification_status')->nullable()->change();
        });
    }

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