<?php

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

class ChangeRejectedBillsTable extends Migration
{
    /**
     * Run the migrations.
     * rejected_bills表 is_loaded，is_checked 字段添加索引
     * @return void
     */
    public function up()
    {
        Schema::table('rejected_bills',function (Blueprint $table){
            $table->index('is_loaded','rejected_bills_is_loaded_index');
            $table->index('is_checked','rejected_bills_is_checked_index');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::table('rejected_bills',function (Blueprint $table){
            $table->dropIndex('rejected_bills_is_loaded_index');
            $table->dropIndex('rejected_bills_is_checked_index');
        });
    }
}
