<?php

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

class AddRejectUserBankSlipTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('user_bank_slips', function (Blueprint $table) {
            $table->boolean('is_reject')->default('0');
            $table->string('reject_reason')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        if (Schema::hasColumn('user_bank_slips', 'is_reject')) {
            Schema::table('user_bank_slips', function (Blueprint $table) {
                // $table->dropColumn('is_reject');
                // $table->dropColumn('reject_reason');
            });
        }
    }
}
